Exemplo n.º 1
0
    public void PlaceObj(int _index, Point _gridPos, GameObject _originObj)
    {
        gridPos = _gridPos;
        tile    = LevelManager.Instance.Tiles [gridPos];
        shipScr = LevelManager.Instance.Ships [gridPos.Z].GetComponent <ShipScript> ();
        pwrMngr = shipScr.gameObject.GetComponent <ShipPowerMngr> ();

        saveStr = (objStr + ",7," + gridPos.X.ToString() + "," + gridPos.Y.ToString());
        LevelManager.Instance.parameterList.Add(saveStr);

        transform.SetParent(tile.transform);

        //DEBUG
        tile.WeaponPlacable = false;

        GameManager.Instance.Buy();

        shipScr.AddWeaponToList(this);
    }