Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
488 changes: 476 additions & 12 deletions Assets/Scenes/testScene/test_dassai.unity

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Assets/scripts/dassai_test/Gene_Equipment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using UnityEngine;
using System;

//装備品によるステータス変化や装備ごとの上げ幅を管理する
public class Gene_Equipment : MonoBehaviour
{
int atack=0;
Expand Down
1 change: 1 addition & 0 deletions Assets/scripts/dassai_test/GoodsSelecter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

public class GoodsSelecter : MonoBehaviour
{
//�A�C�e���E�����w����ʂŕ\������{�^��=�i���𒊑I����
public GameObject[] Item = new GameObject[30];
int selecter1;
int selecter2;
Expand Down
1 change: 1 addition & 0 deletions Assets/scripts/dassai_test/Mane_DandD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using UnityEngine.EventSystems;
using UnityEngine.UI;

//�h���b�O&�h���b�O�̋@�\����낤�Ƃ�������
[RequireComponent(typeof(Image))]

public class Mane_DandD : MonoBehaviour, IDragHandler, IBeginDragHandler, IDropHandler
Expand Down
3 changes: 2 additions & 1 deletion Assets/scripts/dassai_test/Mane_Purchase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using UnityEngine;

//�X�L���w����ʂŕ\������{�^���𒊑I����
public class Mane_Purchase : MonoBehaviour
{
public GameObject[] Item = new GameObject[30];
Expand All @@ -13,7 +14,7 @@ public class Mane_Purchase : MonoBehaviour
void Start()
{

for (int i = 0; i <= 12; i++)
for (int i = 0; i < 12; i++)
{
Item[i].SetActive(false);
Debug.Log(i + "����A�N�e�B�u��");
Expand Down
1 change: 1 addition & 0 deletions Assets/scripts/dassai_test/Mane_PurchaseEquip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

public class Mane_PurchaseEquip : MonoBehaviour
{
//�����i�̍w���E�������̑����E���z�̑������Ǘ�����
//cost�ł��l�i,ShowCost�͒l�D�̖���,itemNo�͊Ǘ��p�Ƀ{�^����ˆ�‚Ɋ��蓖�Ă鐔��
int cost;
public GameObject ShowCost;
Expand Down
23 changes: 19 additions & 4 deletions Assets/scripts/dassai_test/Mane_PurchaseItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,25 @@

public class Mane_PurchaseItem : MonoBehaviour
{
//�A�C�e�����w�����ď������𑝂₵����A���z�𑝂₵���肷��
//�����ƃA�C�e���w����ʂ͋��ʂł���A�����ōw����ʂ̕\���E��\��(�E�V�[���J�ڂ�)�Ǘ�����
//cost�ł��l�i,ShowCost�͒l�D�̖���,itemNo�͊Ǘ��p�Ƀ{�^����ˆ�‚Ɋ��蓖�Ă鐔��
int cost;
public GameObject ShowCost;
//���ꂼ��9�‚���
List<int> itemAmount = new List<int>() { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
[SerializeField] int itemNo;
public GameObject background;
bool isBackShown;

void Start()
{
isBackShown = true;
//case0���I���{�^���Ɋ��蓖�Ă�
switch (itemNo)
{
case 0:
cost = 10;
cost = 0;
break;

case 1:
Expand Down Expand Up @@ -62,13 +68,22 @@ void Start()
//�{�^���N���b�N���ɃA�C�e�������Z�ƒl�i����1.5�{��
public void OnClick()
{
itemAmount[itemNo]++;
Debug.Log(itemNo + "��"+cost+"�ōw�����ꂽ");
cost = (int)Math.Round(1.5 * cost);
if (itemNo == 0)
{
isBackShown = false;
}
else
{
itemAmount[itemNo - 1]++;
Debug.Log(itemNo + "��" + cost + "�ōw�����ꂽ");
cost = (int)Math.Round(1.5 * cost);
}
}

void Update()
{
ShowCost.GetComponent<Text>().text = cost + "�ōw��";
background.SetActive(isBackShown);
//����isbackshown=false�Ȃ�V�[���J�ڂɈڂ�Ƃ�...?
}
}
28 changes: 21 additions & 7 deletions Assets/scripts/dassai_test/Mane_PurchaseSkil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
using UnityEngine.UI;
using System;

//スキル購入によるお金の増減、スキル取得フラグの管理をする
//購入/終了ボタンを押すと次のアイテム/装備購入画面に移る
public class Mane_PurchaseSkil : MonoBehaviour
{
//costでお値段,ShowCostは値札の役割,Skillpanelは購入の背景になるやつ
Expand All @@ -15,6 +17,7 @@ public class Mane_PurchaseSkil : MonoBehaviour
List<bool> haveSkil = new List<bool>() { false, false, false, false, false, false, false, false, false };
[SerializeField] int skilNo;

//case10を終了ボタンに割り当て
void Start()
{
isSkillshown = true;
Expand All @@ -35,22 +38,33 @@ void Start()
case 3:
cost = 7;
break;
case 10:
cost = 0;
break;
}
}

//ボタンクリック時にアイテム数加算と値段を大体1.5倍に
public void OnClick()
{
if (haveSkil[skilNo])
if (skilNo == 10)
{
Debug.Log("購入済です");
Debug.Log("購入フェイズ終了");
isSkillshown = false;
}
else
if (skilNo != 10)
{
Debug.Log(skilNo + "が" + cost + "で購入された");
haveSkil[skilNo] = true;
cost = (int)Math.Round(1.5 * cost);
isSkillshown = false;
if (haveSkil[skilNo])
{
Debug.Log("購入済です");
}
else
{
Debug.Log(skilNo + "が" + cost + "で購入された");
haveSkil[skilNo] = true;
cost = (int)Math.Round(1.5 * cost);
isSkillshown = false;
}
}
}

Expand Down