protected void Start() { _healthChangeEnabled = new TieredLock <EHealthLockReason>(); _stateMachine = gameObject.GetComponent <IActionStateMachineInterface>(); MaxHealth = InitialHealth; ReplenishHealth(); }
protected void Start() { DeathMessage = new LocalisedTextRef(new LocalisationKey("UIMessages", "DeathMessage")); SavedMessage = new LocalisedTextRef(new LocalisationKey("UIMessages", "SaveMessage")); _actionStateMachine = gameObject.GetComponent <IActionStateMachineInterface>(); _localDispatcher = gameObject.GetComponent <IUnityMessageEventInterface>().GetUnityMessageEventDispatcher(); _uiDispatcher = GameInstance.CurrentInstance.GetUIMessageDispatcher(); RegisterForMessages(); }
public AttackTargetGoal(GameObject inOwner, GameObject inTarget) : base(inOwner) { _target = inTarget; if (inOwner != null) { _attack = inOwner.GetComponent <IAttackInterface>(); } if (inTarget != null) { _targetState = inTarget.GetComponent <IActionStateMachineInterface>(); } }
private void GetRefreshables() { _healthInterface = gameObject.GetComponent <IHealthInterface>(); _actionStateMachine = gameObject.GetComponent <IActionStateMachineInterface>(); }
private bool InLocomotion(IActionStateMachineInterface inActionStateMachineInterface) { return(inActionStateMachineInterface != null && inActionStateMachineInterface.IsActionStateActiveOnTrack(EActionStateMachineTrack.Locomotion, EActionStateId.Locomotion)); }