SHARE
TWEET

Untitled

a guest Nov 14th, 2017 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private void StartZigZag()
  2.     {
  3.         transform.Translate(Vector3.left * velocityMovimentEnemy * Time.deltaTime);
  4.         transform.Translate(Vector3.up * velocityMovimentEnemy * Time.deltaTime);
  5.  
  6.         if (transform.position.y >= m_LimitDistanceMax)
  7.         {
  8.             print("Start down");
  9.  
  10.             transform.Translate(Vector3.down * velocityMovimentEnemy * Time.deltaTime);
  11.         }
  12.        
  13.         if (transform.position.y <= (m_LimitDistanceMin))
  14.         {
  15.             print("Start Up");
  16.  
  17.             transform.Translate(Vector3.up * velocityMovimentEnemy * Time.deltaTime);
  18.         }
RAW Paste Data
Top