public void OnStart() { STALK_RANGE = DEFAULT_STALK_RANGE; //dependencies //cmesh = gameObject.RequireComponent<CMeshRenderer>(); stealth_player = Common.GetStealthPlayer(); monster3Woman = GetScript<Monster3Woman>(GameObject.GetGameObjectByName("Monster3Woman")); sound = gameObject.RequireComponent<CSound>(); //states smc = new StateMachineController(); inactive = new State(smc, null, null, null); incoming = new State(smc, State_Incoming_Start, State_Incoming_Update, null); stalking = new State(smc, State_Stalking_Start, State_Stalking_Update, null, 5.0f, incoming); resetting = new State(smc, State_Reset_Start, State_Reset_Update, null, 18.0f, stalking); attacking = new State(smc, State_Attacking_Start, State_Attacking_Update, State_Attacking_End, 4.0f, inactive); panicking = new State(smc, State_Panicking_Start, State_Panicking_Update, State_Panicking_End, 1.5f, resetting); helper = new MonsterHelper(); smc.SetState(resetting); }
public void OnStart() { STALK_RANGE = DEFAULT_STALK_RANGE; //dependencies //cmesh = gameObject.RequireComponent<CMeshRenderer>(); stealth_player = Common.GetStealthPlayer(); monster3Woman = GetScript <Monster3Woman>(GameObject.GetGameObjectByName("Monster3Woman")); sound = gameObject.RequireComponent <CSound>(); //states smc = new StateMachineController(); inactive = new State(smc, null, null, null); incoming = new State(smc, State_Incoming_Start, State_Incoming_Update, null); stalking = new State(smc, State_Stalking_Start, State_Stalking_Update, null, 5.0f, incoming); resetting = new State(smc, State_Reset_Start, State_Reset_Update, null, 18.0f, stalking); attacking = new State(smc, State_Attacking_Start, State_Attacking_Update, State_Attacking_End, 4.0f, inactive); panicking = new State(smc, State_Panicking_Start, State_Panicking_Update, State_Panicking_End, 1.5f, resetting); helper = new MonsterHelper(); smc.SetState(resetting); }