public void DoAction() { if (interactionManager.overlapEcastms.Count != 0) { var eventObj = interactionManager.overlapEcastms[0]; if (eventObj.active && !directorManager.IsPlaying) { if (eventObj.eventName == "frontStab") { directorManager.PlayFrontStab(this, eventObj.actorManager); } else if (eventObj.eventName == "openBox") { var target = eventObj.actorManager.transform; if (BattleManager.CheckAnglePlayer(actorController.Model, target.gameObject, 15)) { eventObj.active = false; transform.position = target.position + target.TransformVector(eventObj.offset); actorController.Model.transform.LookAt(target, Vector3.up); directorManager.PlayOpenBox(this, eventObj.actorManager); } } else if (eventObj.eventName == "leverUp") { var target = eventObj.actorManager.transform; if (BattleManager.CheckAnglePlayer(actorController.Model, target.gameObject, 15)) { eventObj.active = false; transform.position = target.position + target.TransformVector(eventObj.offset); actorController.Model.transform.LookAt(target, Vector3.up); directorManager.PlayLeverUp(this, eventObj.actorManager); } } } } }