void Start() { playerStats.AdjustInventory(); SpriteEquip(); throwablePrefab = Resources.Load("Prefabs/ThrownWeapon") as GameObject; idle = new IdleState(this); states.Add(idle.stateName, idle); move = new MoveState(this); states.Add(move.stateName, move); dodge = new DodgeState(this); states.Add(dodge.stateName, dodge); sprint = new SprintState(this); states.Add(sprint.stateName, sprint); slide = new SlideState(this); states.Add(slide.stateName, slide); combo = new ComboState(this); states.Add(combo.stateName, combo); strong_attack = new StrongRedirectState(this); states.Add(strong_attack.stateName, strong_attack); dash_attack = new DashRedirectState(this); states.Add(dash_attack.stateName, dash_attack); defense = new DefensiveRedirectState(this); states.Add(defense.stateName, defense); guard = new GuardState(this); states.Add(guard.stateName, guard); stun = new StunState(this); states.Add(stun.stateName, stun); strike = new StrikeState(this); states.Add(strike.stateName, strike); death = new DeathState(this); states.Add(death.stateName, death); currentState = idle; currentState.StartState(); }
internal static bool ConvertToDecoration( ConverterState converterState, string decoration, ref ULState ulState, ref StrikeState strikeState ) { ulState = ULState.ULNone; strikeState = StrikeState.StrikeNone; if (decoration.IndexOf("Underline", StringComparison.OrdinalIgnoreCase) != -1) { ulState = ULState.ULNormal; } if (decoration.IndexOf("Strikethrough", StringComparison.OrdinalIgnoreCase) != -1) { strikeState = StrikeState.StrikeNormal; } return ulState != ULState.ULNone || strikeState != StrikeState.StrikeNone; }
public void Strike(Vector2 handPosition) { myState = new StrikeState(this); myPosition.X = handPosition.X / 2; myPosition.Y = handPosition.Y; }