Beispiel #1
0
    //public bool isPlayer = false;

    public void Init(FG_SavedCharacter saved, CharacterUnitController controller)
    {
        unitController = controller;
        map            = controller.map;
        tileX          = (int)transform.position.x;
        tileY          = (int)transform.position.y;

        savedCharacter = saved;
        savedCharacter.SetMaxVitals();
        savedCharacter.RefillVitals();
        GetComponent <SpriteRenderer>().sprite = GameController.Instance.iconManager.GetIconById(savedCharacter.baseClass.Icon);

        //add spells
        AddSpell(saved.characterData.Spell1);
        AddSpell(saved.characterData.Spell2);
        AddSpell(saved.characterData.Spell3);
        AddSpell(saved.characterData.Spell4);

        //
        if (gameObject.tag == "Player")
        {
            isPlayerMark.SetActive(true);
            isEnemyMark.SetActive(false);
        }
        else
        {
            isPlayerMark.SetActive(false);
            isEnemyMark.SetActive(true);
        }

        gameObject.SetActive(true);
        InitState();
    }
    public void Init(CharacterUnitController uController)
    {
        unitController = uController;

        RefreshBar();
        foreach (var go in orderImage)
        {
            go.gameObject.SetActive(true);
        }
    }