public ToProjectile(StateMachine sm_) { sm = sm_; targetState = sm_.retreatState; condition = new ProjectileCondition(sm); actions = new IAction[1]; actions[0] = new ProjectileAction(sm); }
public Projectile(Texture2D texture, Color color, Vector2 pos, Vector2 size, Vector2 velocity, ProjectileAction action) { this.texture = texture; this.color = color; this.pos = pos; this.size = size; this.velocity = velocity; this.action = action; UpdateRotation(); }
public ProjectileState(StateMachine sm_) { sm = sm_; transitions = new ITransition[3]; transitions[0] = new ToInitial(sm_); transitions[1] = new ToAdvance(sm_); transitions[2] = new ToRetreat(sm_); exitActions = new IAction[1]; exitActions[0] = new ProjectileAction(sm); entryActions = new IAction[1]; entryActions[0] = new ProjectileAction(sm); actions = new IAction[1]; actions[0] = new ProjectileAction(sm); }