Ejemplo n.º 1
0
        public override bool fire(State.AppearablePositionState target, State.DestructableState targetHealth)
        {
            util.Line.DrawTempLine(thisPosition.position, target.position, Color.red);
            var hit        = didHit(target);
            int damageDone = hit? weaponDescription.damage : 0;

            return(targetHealth.changeHp(-damageDone));
        }
Ejemplo n.º 2
0
 public static StateAction followReference(this Ship ship, State.AppearablePositionState target)
 {
     return(new FollowReference().Init(ship.state.positionState, target, 15f, 30));
 }
Ejemplo n.º 3
0
        public override bool fire(State.AppearablePositionState target, State.DestructableState targetHealt)
        {
            int damageDone = 0;

            return(false);
        }
Ejemplo n.º 4
0
 public virtual bool didHit(State.AppearablePositionState target, out float distance)
 {
     distance = Vector3.Distance(thisPosition.position, target.position);
     return(_didHit(distance));
 }
Ejemplo n.º 5
0
 public abstract bool fire(State.AppearablePositionState target, State.DestructableState targetHealth);
Ejemplo n.º 6
0
 public virtual Weapon init(State.AppearablePositionState thisPosition, WeaponDescription weaponDescription)
 {
     this.thisPosition      = thisPosition;
     this.weaponDescription = weaponDescription;
     return(this);
 }