コード例 #1
0
    public void transit(Transition t)
    {
        HexGenerator hxg = GameObject.FindObjectOfType <HexGenerator>();

        Pawn.selected.activate();
        last = t;
        hxg.get(t.x, t.y, t.z).OnMouseDown();
    }
コード例 #2
0
ファイル: Pawn.cs プロジェクト: mikev37/2danimationtesting
    // Start is called before the first frame update
    void Start()
    {
        HexGenerator grid = GameObject.FindObjectOfType <HexGenerator>();

        tile               = grid.get(x, y, z);
        tile.occupier      = this;
        transform.position = tile.transform.position;
        x  = tile.x;
        y  = tile.y;
        z  = tile.z;
        id = UnityEngine.Random.Range(int.MinValue, int.MaxValue);
        if (color)
        {
            GetComponentInChildren <BodyGenerator>().transform.localScale *= new Vector2(-1, 1);
        }

        name += "" + initiative;
    }