コード例 #1
0
 public void load()
 {
     itemNum = new int[6] {
         0, 0, 0, 0, 0, 0
     };
     equip = new EqBuff();
     AchievementManager.Instance.init();
     SaveLoad.Instance.load();
     GameMaster.Instance.calcParam();
 }
コード例 #2
0
    // Use this for initialization
    void Awake()
    {
        if (this != Instance)
        {
            Destroy(this);
            return;
        }

        DontDestroyOnLoad(this.gameObject);
        itemNum = new int[6] {
            0, 0, 0, 0, 0, 0
        };
        equip = new EqBuff();
    }
コード例 #3
0
    public void UseItemButtonClicked(int itemID)
    {
        Param  p     = player.GetComponent <Param> ();
        EqBuff equip = GameMaster.Instance.equip;

        if (GameMaster.Instance.itemNum [itemID] > 0)
        {
            switch (itemID)
            {
            case 0:
                p.hp += 80;
                if (p.hp > p.maxHp)
                {
                    p.hp = p.maxHp;
                }
                LogManager.Instance.PutLog("Rec Potionを 使った");
                break;

            case 1:
                equip.atkForce = 11;
                LogManager.Instance.PutLog("Atk Potionを 使った");
                break;

            case 2:
                equip.defForce = 11;
                LogManager.Instance.PutLog("Def Potionを 使った");
                break;

            case 3:
                equip.hitForce = 11;
                LogManager.Instance.PutLog("Hit Potionを 使った");
                break;

            case 4:
                equip.evaForce = 11;
                LogManager.Instance.PutLog("Eva Potionを 使った");
                break;

            default:
                break;
            }
            GameMaster.Instance.itemNum [itemID]--;
            GameMaster.Instance.calcParam();
            pla.actphase = Actor.Phase.MOVE_START;
            AudioManager.Instance.playSE(5);
        }
    }
コード例 #4
0
 // Use this for initialization
 void Start()
 {
     targettext = GetComponent <Text> ();
     equip      = GameMaster.Instance.equip;
 }