public override void Init() { collisionCtrl = GetComponent <PlatformCollisionController>(); if (collisionCtrl != null) { collisionCtrl.Init(); } rotatingSpeed = (angleEachRotation < 0) ? -rotatingSpeed : rotatingSpeed; isActive = true; StartCoroutine(CRotate()); }
public override void Init() { collisionCtrl = GetComponent <PlatformCollisionController>(); if (collisionCtrl != null) { collisionCtrl.Init(); } reachPoints.Add(Instantiate(new GameObject("StartPosition"), transform).transform); reachPointsPositions = reachPoints.Select(t => t.position).ToList(); distanceTraveled = 0; setupped = true; canMove = true; SetNextWaypoint(); }