Defines the weapons. Both hand-held by characters or guns established on turret are weapons.
Inheritance: Dynamic
コード例 #1
0
ファイル: TankGameUnitAI.cs プロジェクト: huytd/fosproject
 public AttackTask( Weapon weapon, Dynamic target )
 {
     this.weapon = weapon;
     this.targetPosition = new Vec3( float.NaN, float.NaN, float.NaN );
     this.targetEntity = target;
 }
コード例 #2
0
ファイル: TankGameUnitAI.cs プロジェクト: huytd/fosproject
        void DoAttackTask( Weapon weapon, Dynamic target )
        {
            AttackTask task = attackTasks.Find( delegate( AttackTask t )
            {
                return t.Weapon == weapon;
            } );

            if( task != null && task.TargetEntity == target )
                return;

            if( task != null )
                ResetAttackTask( task );

            task = new AttackTask( weapon, target );
            AddRelationship( target );
            attackTasks.Add( task );
        }
コード例 #3
0
ファイル: TankGameUnitAI.cs プロジェクト: huytd/fosproject
 //
 public AttackTask( Weapon weapon, Vec3 target )
 {
     this.weapon = weapon;
     this.targetPosition = target;
     this.targetEntity = null;
 }
コード例 #4
0
ファイル: TankGameUnitAI.cs プロジェクト: huytd/fosproject
        void DoAttackTask( Weapon weapon, Vec3 target )
        {
            AttackTask task = attackTasks.Find( delegate( AttackTask t )
            {
                return t.Weapon == weapon;
            } );

            if( task != null && task.TargetPosition == target )
                return;

            ResetAttackTask( task );

            task = new AttackTask( weapon, target );
            attackTasks.Add( task );
        }