コード例 #1
0
        public override MapObj convertToMapObj()
        {
            MapObj temp = new MapObj(ID, type, BombermanOverlord.vecToFlArray(transform.localPosition));

            temp.explodeDuration = explodeTime - Time.time;
            return(temp);
        }
コード例 #2
0
        public override MapObj convertToMapObj()
        {
            MapObj temp = new MapObj(ID, type, BombermanOverlord.vecToFlArray(transform.localPosition), bombsLeft);

            temp.targetPos = BombermanOverlord.vecToFlArray(targetPos);
            temp.color     = color;
            return(temp);
        }
コード例 #3
0
        public void placeBomb()
        {
            if (GameBoard.validCoord(currentCoord [0], currentCoord [1]) == false)
            {
                return;
            }
            if (bombsLeft == 0)
            {
                return;
            }

            Bomb temp = Instantiate(bombPrefab, GameBoard.getGridPos(currentCoord [0], currentCoord [1]), Quaternion.identity, transform.parent).GetComponent <Bomb> ();

            temp.init(3, 3, currentCoord, this);

            BoardAction dropAction = new BoardAction(ActionType.BombSpawn, temp.ID, BombermanOverlord.vecToFlArray(temp.transform.localPosition));

            BombermanGameStateUpdater.addNewAction(dropAction);
            bombsLeft--;
        }
コード例 #4
0
 public float[] getFloatPos()
 {
     return(BombermanOverlord.vecToFlArray(transform.position));
 }