// Update is called once per frame void Update() { // make every entity broadcasts an event to the other entities every frame PerceptionEVManager.TriggerEvent("PERCEPTION", new Hashtable() { { "OBJECT", this.gameObject } }); // every update, if the entity is not being controlled, check for perception component alerted or not if (!Controlled && Perception != null && GambitCollection != null) { // enable the gambit if gambit is off and is alerted if (Perception.Alerted && !GambitCollection.enabled) { GambitCollection.enabled = true; } } // test levelling if (Input.GetKeyUp(KeyCode.Space)) { if (StatCollection != null) { StatCollection.ModifyExp(50); } } }