private void Awake() { _mover = GetComponent <IDirectionMoverComponent>(); _fieldOfView = GetComponent <IFieldOfView>(); CharacterStateMachine = GetComponent <ICharacterStateMachine>(); _currentState = wanderState; }
public ScriptGlobals(Arena arena, Bot bot, List <Bot> bots) { _e55472035b434b1ea185cf32ece2b8bc = bot; _6f4e9d2c3f474f2fa08d833e05cbba60 = bots ?? new List <Bot>( ); _82f726e404434ffba6e186170deb62c6 = arena.Width; _bb242fc7ea564cdebb9e2e60e1979ff0 = arena.Height; _a269ff57246b40fcb2d16fc97f5dea6c = bot.LocationX; _08389405491042dd89325d46355263d1 = bot.LocationY; _037c4fa95d8746db916121ade1c5f1d0 = bot.Orientation; MaximumPhysicalHealth = bot.MaximumPhysicalHealth; _3af8f9c91eb24bd0ab4389ed5241f78c = bot.CurrentPhysicalHealth; PhysicalHealthDrain = bot.PhysicalHealthDrain; MaximumStamina = bot.MaximumStamina; _d5a8c937f540473f9d5f40269401f254 = bot.CurrentStamina; StaminaDrain = bot.StaminaDrain; _8c1900d139b84019984c850387e441d6 = bot.LastAction; _fd832498b5c4470bb4ac626ee3b3952d = LastAction.Idling; _lastAttackLocation = new Position { X = -1, Y = -1 }; Vision = new FieldOfView(arena, bot, bots); _0534fba27330469a120b08d53b05b963 = bot.Memory.Deserialize <Dictionary <String, String> >( ) ?? new Dictionary <String, String>( ); ////_logLogic_a76ef698d9204527836e30719d971888 = logLogic; }
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { _fieldOfView = animator.GetComponent <IFieldOfView>(); _characterStateMachine = animator.GetComponent <ICharacterStateMachine>(); }