Exemplo n.º 1
0
        public TriggerObject CreateShpereTrigger(Vector3 pos, float radius, System.Func <GameObject, bool> checkTrigger, System.Action callBack)
        {
            GameObject o = new GameObject("Trigger");

            o.transform.SetParent(Root.transform);
            o.transform.position = pos;
            TriggerObject trigger = o.AddComponent <TriggerObject>();

            trigger.SetParams(radius, checkTrigger, callBack);

            return(trigger);
        }
Exemplo n.º 2
0
 protected override void RegistEvent()
 {
     _triggerObject = TriggerManager.GetInstance.CreateShpereTrigger(Position, Radius, Check, TriggerEvent);
 }
Exemplo n.º 3
0
 protected override void RegistEvent()
 {
     _triggerObject = TriggerManager.GetInstance.CreateShpereTrigger(Position, Radius, Check, TriggerEvent);
 }