public override MapObj convertToMapObj() { MapObj temp = new MapObj(ID, type, BombermanOverlord.vecToFlArray(transform.localPosition)); temp.explodeDuration = explodeTime - Time.time; return(temp); }
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); }
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--; }
public float[] getFloatPos() { return(BombermanOverlord.vecToFlArray(transform.position)); }