Example #1
0
 // Update is called once per frame
 void Update()
 {
     timer += Time.deltaTime;
     // Move the position of our object.
     gameObject.transform.position =
         Vector3.forward * Mathf.Sin(timer) * 5.0f
         + Vector3.left * Mathf.Cos(timer * 5);
     // Update which cell we are currently in.
     dweller.SyncCellPositionToRealPosition();
 }
Example #2
0
 private void SetPosition(Vector3 newPos)
 {
     transform.position = newPos;
     dweller.SyncCellPositionToRealPosition();
     dweller.SyncRealPositionToCellPosition();
 }