示例#1
0
    void changePositionAndRotate(Node oldEnemy, Node newEnemy, Enemy component)
    {
        component.SetRotation(oldEnemy, newEnemy);
        var x = newEnemy.coor[0];
        var y = newEnemy.coor[1];

        component.target = DrawHex.Position(x, y);
        component.node   = newEnemy;
    }
示例#2
0
文件: Map.cs 项目: haiduchyk/HexaPlay
    public GameObject instantiate(Node node, GameObject prefab)
    {
        int        x   = node.coor[0];
        int        y   = node.coor[1];
        GameObject obj = (GameObject)Instantiate(
            prefab,
            DrawHex.Position(x, y),
            Quaternion.identity,
            this.transform
            );

        obj.name = string.Format("{0}, {1}", x, y);
        return(obj);
    }