コード例 #1
0
ファイル: Unit.cs プロジェクト: DfKimera/campjam12
        public bool attack(Unit enemy)
        {
            if(this.type == 1 && enemy.type == 6) {
                return true;
            }

            if(this.type == 6 && enemy.type == 1) {
                return false;
            }

            return (this.type >= enemy.type);
        }
コード例 #2
0
ファイル: Player.cs プロジェクト: DfKimera/campjam12
 public void showCombatScreen(Unit playerUnit, Unit opponentUnit, bool isWinner, bool isTie)
 {
     send(Message.Create(MessageType.SV_COMBAT_SCREEN, playerUnit.id, opponentUnit.id, opponentUnit.type, isWinner, isTie));
 }
コード例 #3
0
ファイル: Player.cs プロジェクト: DfKimera/campjam12
 public void notifyUnitPlacement(Unit unit, int apparentType, int col, int row)
 {
     send(Message.Create(MessageType.SV_UNIT_PLACED, unit.id, apparentType, col, row));
 }
コード例 #4
0
ファイル: Player.cs プロジェクト: DfKimera/campjam12
 public void revealUnit(Unit unit)
 {
     send(Message.Create(MessageType.SV_UNIT_REVEALED, unit.id, unit.type));
 }
コード例 #5
0
ファイル: Player.cs プロジェクト: DfKimera/campjam12
 public void notifyUnitMovement(Unit unit, int newCol, int newRow)
 {
     send(Message.Create(MessageType.SV_UNIT_MOVED, unit.id, newCol, newRow));
 }