Exemplo n.º 1
0
    public override void Init()
    {
        collisionCtrl = GetComponent <PlatformCollisionController>();
        if (collisionCtrl != null)
        {
            collisionCtrl.Init();
        }

        rotatingSpeed = (angleEachRotation < 0) ? -rotatingSpeed : rotatingSpeed;

        isActive = true;
        StartCoroutine(CRotate());
    }
Exemplo n.º 2
0
    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();
    }