Example #1
0
 void Update()
 {
     if (controllable)
     {
         var horizontalInput = Input.GetAxis("Horizontal");
         controllable.MoveHorizontally(horizontalInput);
         if (Input.GetButtonDown("Merge"))
         {
             controllable.Merge();
         }
         if (Input.GetButtonDown("Split"))
         {
             controllable.Split();
         }
         if (Input.GetButtonDown("Jump"))
         {
             controllable.SpecialAction();
         }
     }
 }