Пример #1
0
    //GameObject[] tiles;
    //Tile currentTile;
    //public Vector2 gridCoord;

    protected void Init()
    {
        pos     = new Vector2Int((int)transform.localPosition.x, (int)transform.localPosition.z);
        lastPos = pos;
        TempTurnManager.AddUnit(this);
        tileManager = GameObject.Find("Managers").GetComponent <TileManager>();
        tileManager.AddUnit(this, pos);

        spriteFaceCamera = GetComponent <SpriteFaceCamera>();
        // remainingMove = Energy;
        floatingText = Resources.Load("Prefabs/GUI/FloatingText") as GameObject;

        MEnergy       = Energy;
        MStrength     = Strength;
        MConstitution = Constitution;
    }