public override bool interact(Action.ActionArgs action) { if (action is Action.InteractEntityActionArgs) { IInteractable damager = ((Action.InteractEntityActionArgs)action).InteractedEntity; if (damager is Enemy) { Enemy enemy = (Enemy)damager; if (canDamage) { this.damageBy(enemy); canDamage = false; canMove = false; damageTimer.setDelay(3500, delegate() { this.canDamage = true; this.blinkTimer.resetTimer(); this.color = Color.White; }); moveTimer.setDelay(1000, delegate() { this.canMove = true; }); blinkTimer.setRepeat(75, delegate() { if (this.color.A == 255) { this.color = Color.Transparent; } else { this.color = Color.White; } }); } return(true); } } return(false); }
public override bool interact(Action.ActionArgs action) { if (action is Action.InteractEntityActionArgs) { IInteractable damager = ((Action.InteractEntityActionArgs)action).InteractedEntity; if (damager is Shuriken) { Shuriken enemy = (Shuriken)damager; if (canDamage) { //enemy.bounce(); enemy.attachToEntity(this); canDamage = false; damageTimer.setDelay(3500, delegate() { this.canDamage = true; this.blinkTimer.resetTimer(); this.color = Color.Pink; }); blinkTimer.setRepeat(75, delegate() { if (this.color.A == 255) { this.color = Color.Transparent; } else { this.color = Color.Pink; } }); } return(true); } } return(false); }
public static bool hasInteractingEntity(ActionArgs action) { return(action is InteractEntityActionArgs); }
public abstract bool interact(Action.ActionArgs action);
/// <summary> /// Odziaływanie na inny obiekt /// </summary> /// <param name="action">Akcja</param> public virtual bool interact(Action.ActionArgs action) { return(false); }
public bool interact(Entity.Action.ActionArgs action) { return(false); }
public override bool interact(Action.ActionArgs action) { throw new NotImplementedException(); }