Defines the weapons. Both hand-held by characters or guns established on turret are weapons.
Inheritance: Dynamic
Beispiel #1
0
 public AttackTask( Weapon weapon, Dynamic target )
 {
     this.weapon = weapon;
     this.targetPosition = new Vec3( float.NaN, float.NaN, float.NaN );
     this.targetEntity = target;
 }
Beispiel #2
0
        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 );
        }
Beispiel #3
0
 //
 public AttackTask( Weapon weapon, Vec3 target )
 {
     this.weapon = weapon;
     this.targetPosition = target;
     this.targetEntity = null;
 }
Beispiel #4
0
        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 );
        }