コード例 #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);
        }
コード例 #2
0
 protected override void RegistEvent()
 {
     _triggerObject = TriggerManager.GetInstance.CreateShpereTrigger(Position, Radius, Check, TriggerEvent);
 }
コード例 #3
0
 protected override void RegistEvent()
 {
     _triggerObject = TriggerManager.GetInstance.CreateShpereTrigger(Position, Radius, Check, TriggerEvent);
 }