Пример #1
0
    void GetBuff(int index)
    {
        if (!characterCluster)
        {
            characterCluster = GameObject.FindGameObjectWithTag("CharacterCluster").GetComponent <CharacterCluster>();
        }


        switch (index)
        {
        // heal
        case 0:
            HealAll();
            Debug.Log(buffList.buffList[index].description);
            break;

        case 1:
            AttackUp();
            Debug.Log(buffList.buffList[index].description);
            break;

        default:
            Debug.Log("Out of index");
            break;
        }
        Destroy(gameObject);
    }
Пример #2
0
    public void Camp()
    {
        Instantiate(resultUI, transform.position, Quaternion.identity);


        // destroy character on return
        CharacterCluster characterCluster = GameObject.FindGameObjectWithTag("CharacterCluster").GetComponent <CharacterCluster>();

        characterCluster.Disappear();

        int result = WorldDestroyer.CalculateResult(characterCluster.characterLists.Count, 1.0f, 1.0f);

        GameState.instance.UpdateWDPosition(result);


        // Save current position
        GameState.instance.SavePosition();


        // setupCamp position
        CampUI.Instance.ActivePosition();



        Destroy(this.gameObject);
    }
Пример #3
0
    // Start is called before the first frame update
    void Start()
    {
        currentTime = maxTime;

        characterCluster = GameObject.FindGameObjectWithTag("CharacterCluster").GetComponent <CharacterCluster>();
        dungeonInfo      = GameObject.FindGameObjectWithTag("Info").GetComponent <DungeonInfo>();

        if (characterCluster.currentMapLocation == 4)
        {
            dungeonInfo.SetUpRooms();
        }
    }
Пример #4
0
    private void InitializeData()
    {
        if (characterCluster == null)
        {
            characterCluster = GameObject.FindGameObjectWithTag("CharacterCluster").GetComponent <CharacterCluster>();
        }

        if (enemy == null)
        {
            enemy = GameObject.FindGameObjectWithTag("Enemy").GetComponent <Enemy>();
        }

        if (boss == null)
        {
            boss = GameObject.FindGameObjectWithTag("Boss").GetComponent <Boss>();
        }
    }
Пример #5
0
 // Start is called before the first frame update
 void Start()
 {
     currentHealth    = maxHealth;
     characterCluster = GameObject.FindGameObjectWithTag("CharacterCluster").GetComponent <CharacterCluster>();
 }