public override void ExitState() { CustomDebug.LogMessage("Idle exit!", DebugColor.red); ICommand command = new ChangeAnimationCommand(owner, GetType()); command.Execute(); }
public override void EnterState() { CustomDebug.LogMessage("Dead enter!", DebugColor.green); ICommand deadCMD = new DeadAnimationCommand(owner, GetType()); deadCMD.Execute(); }
public override void ExitState() { _movementLogic.InteractObstacle(); CustomDebug.LogMessage("Move exit!", DebugColor.red); ICommand command = new ChangeAnimationCommand(owner, GetType()); command.Execute(); }
public override void EnterState() { CustomDebug.LogMessage("Move enter!", DebugColor.green); CustomDebug.LogMessage(owner.StatusController.GetSpeedModificator()); ICommand command = new ChangeAnimationCommand(owner, GetType(), owner.StatusController.GetSpeedModificator()); command.Execute(); }
public CharacterValueSO ChoseDefaultValue() { var defaultValue = Resources.Load <CharacterValueSO>(pathDefaultCharacterValue); CustomDebug.LogMessage("Set Default Value", DebugColor.blue); CustomDebug.LogMessage(defaultValue); return(defaultValue); }
public override void ExitState() { owner.StatusController.SetReloadTime(Time.time); CustomDebug.LogMessage("Attack exite!", DebugColor.red); ICommand command = new ChangeAnimationCommand(owner, GetType()); command.Execute(); }
public void AddModuleInList(IUpdatableModule module) { CustomDebug.LogMessage($"Add module - {module}", DebugColor.orange); if (_allUpdatableModule.Contains(module)) { return; } _allUpdatableModule.Add(module); }
public void HandleCommand(DamageValue <AbstractCharacter> value) { if (isCheat) { return; } if (isRetreat) { isRetreat = false; } var deltaDamage = _currentHealth - value.damageValue; _currentHealth = (deltaDamage > 0) ? deltaDamage : Dead(); CustomDebug.LogMessage(CurrentHealth); }
private void CheckExceptionAnimatorComponent() { try { if (GetComponent <Animator>() == null) { CustomDebug.LogMessage($"Exeption! No comonent - ANIMATOR in object - <b>{gameObject.name}</b>!", DebugColor.red); throw new Exception(); } } catch (Exception e) { CustomDebug.LogMessage(e, DebugColor.red); gameObject.AddComponent <Animator>(); CustomDebug.LogMessage($"Add new component - ANIMATOR is object - {gameObject.name}", DebugColor.blue); } }
private void CheckExeptionInCharacterValue() { try { if (characterValue is null) { CustomDebug.LogMessage($"Exeption! No VALUE SO in object - <b>{gameObject.name}</b>!", DebugColor.red); throw new Exception(); } } catch (Exception e) { CustomDebug.LogMessage(e, DebugColor.red); var valueExeption = new CharacterValueExeption(); characterValue = valueExeption.ChoseDefaultValue(); } }
private bool CheckExeptionInLibrary(Type type) { bool result = true; try { if (!_objectLibrary.ContainsKey(type)) { throw new Exception(); } } catch (Exception e) { CustomDebug.LogMessage(e, DebugColor.red); CustomDebug.LogMessage($"No object - {type} in CreatorLibrary!", DebugColor.red); result = false; } return(result); }
public override void ExitState() { CustomDebug.LogMessage("Dead exit!", DebugColor.green); }
public override void EnterState() { CustomDebug.LogMessage("Attack enter!", DebugColor.green); SendAttackCommand(); }
public override void EnterState() { timerToFlip = ResetTimer(); CustomDebug.LogMessage("Idle enter!", DebugColor.green); }