public override void Enter() { if (owner.GuardIndicator != null) { owner.GuardIndicator.SetIndicatorSprite(owner.GuardIndicator.GetIndicatorSprite(GeneralVariables.GUARD_ICON.QUESTION_MARK)); } StateVariables stateVariables = owner.FSM.GetStateVariables <MoveToAlarmState>(); owner.LightFeedback.SetColour(stateVariables.GetLightColour()); owner.VisionCone.SetMaterialColour(stateVariables.GetLightColour()); agent.speed = stateVariables.GetMovementSpeed(); }
public override void Enter() { setMovingAnimation(false); agent.destination = owner.Home; if (owner.GuardIndicator != null) { owner.GuardIndicator.SetIndicatorSprite(owner.GuardIndicator.GetIndicatorSprite(GeneralVariables.GUARD_ICON.DOTS)); } StateVariables stateVariables = owner.FSM.GetStateVariables <IdleState>(); owner.LightFeedback.SetColour(stateVariables.GetLightColour()); owner.VisionCone.SetMaterialColour(stateVariables.GetLightColour()); agent.speed = stateVariables.GetMovementSpeed(); }
public override void Enter() { locations = owner.GetComponent <LocationsToCheck>(); Vector3 newLocation = locations.GetLocationCloseToPlayer(); currentDestination = newLocation; agent.SetDestination(currentDestination); locationsChecked = 1; if (owner.GuardIndicator != null) { owner.GuardIndicator.SetIndicatorSprite(owner.GuardIndicator.GetIndicatorSprite(GeneralVariables.GUARD_ICON.QUESTION_MARK)); } StateVariables stateVariables = owner.FSM.GetStateVariables <LookForPlayerState>(); owner.LightFeedback.SetColour(stateVariables.GetLightColour()); owner.VisionCone.SetMaterialColour(stateVariables.GetLightColour()); agent.speed = stateVariables.GetMovementSpeed(); }
public override void Enter() { path = owner.GetComponent <PatrolPathManager>(); agent.destination = path.GetNextLocation(currentLocation); if (owner.GuardIndicator != null) { owner.GuardIndicator.SetIndicatorSprite(owner.GuardIndicator.GetIndicatorSprite(GeneralVariables.GUARD_ICON.DOTS)); } StateVariables stateVariables = owner.FSM.GetStateVariables <PatrolState>(); owner.LightFeedback.SetColour(stateVariables.GetLightColour()); owner.VisionCone.SetMaterialColour(stateVariables.GetLightColour()); agent.speed = stateVariables.GetMovementSpeed(); Animator animator = owner.GetComponentInChildren <Animator>(); animator.SetBool("isMoving", true); }