예제 #1
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if(col.gameObject.tag == targetTagName & (triggerMode == COLLISIONMODE.TRIGGER | triggerMode == COLLISIONMODE.BOTH))
     {
         on = SWITCHFLAG.ON;
     }
 }
예제 #2
0
 void OnCollisionEnter2D(Collision2D col)
 {
     if (col.gameObject.tag == targetTagName & (triggerMode == COLLISIONMODE.COLLISION | triggerMode == COLLISIONMODE.BOTH))
     {
         on = SWITCHFLAG.ON;
     }
 }
예제 #3
0
 void OnCollisionEnter2D(Collision2D col)
 {
     if (col.gameObject.tag == targetTagName & (triggerMode == COLLISIONMODE.COLLISION | triggerMode == COLLISIONMODE.BOTH))
     {
         on = SWITCHFLAG.ON;
     }
 }
예제 #4
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.gameObject.tag == targetTagName & (triggerMode == COLLISIONMODE.TRIGGER | triggerMode == COLLISIONMODE.BOTH))
     {
         on = SWITCHFLAG.ON;
     }
 }
예제 #5
0
 // Update is called once per frame
 void Update()
 {
     if (on == SWITCHFLAG.ON)
     {
         if (anim != null)
             anim.enabled = true;
         foreach (Switchable s in list)
         {
             if(s != null)
                 s.onSwitch();
         }
         on = SWITCHFLAG.NON;
     }
 }
예제 #6
0
 // Update is called once per frame
 void Update()
 {
     if (on == SWITCHFLAG.ON)
     {
         if (anim != null)
         {
             anim.enabled = true;
         }
         foreach (Switchable s in list)
         {
             if (s != null)
             {
                 s.onSwitch();
             }
         }
         on = SWITCHFLAG.NON;
     }
 }
예제 #7
0
 // Use this for initialization
 void Start()
 {
     on = SWITCHFLAG.OFF;
 }
예제 #8
0
 // Use this for initialization
 void Start()
 {
     on = SWITCHFLAG.OFF;
 }