Example #1
0
    public override void Trigger(GameObject Actor)
    {
        if (Actor != null)
        {
            levController = Actor.GetComponent <LevController>();
            if (levController == null)
            {
                Debug.LogError("Actor is does not have Lev Controller");
                return;
            }

            switch (direction)
            {
            case LevController.Direction.Left: levController.moveLeft(); break;

            case LevController.Direction.Right: levController.moveRight(); break;
            }
        }
    }
Example #2
0
    public override void UpdateTime(GameObject Actor, float time, float deltaTime)
    {
        if (Actor != null)
        {
            levController = Actor.GetComponent <LevController>();
            if (levController == null)
            {
                Debug.LogError("Actor is does not have Lev Controller");
                return;
            }
            originAcceleration = levController.levSetting.runAcceleration;

            switch (direction)
            {
            case LevController.Direction.Left: levController.moveLeft(); break;

            case LevController.Direction.Right: levController.moveRight(); break;
            }
        }
    }
Example #3
0
    IEnumerator MoveLev(LevController lev)
    {
        while (lev.transform.position.x < transform.position.x + 2.6f)
        {
            lev.moveRight();
            yield return(null);
        }
        float waktu = 1f;

        lev.facingDirection = LevController.Direction.Left;
        while (waktu > 0f)
        {
            lev.stopMoving();
            waktu -= Time.deltaTime;
            yield return(null);
        }
        triggerCinematic.TriggerThis(0f);
        TorchPickable.StopAllTorches();
        yield return(new WaitForSeconds(1));

        rainatar.rainaAnim.speed = 0;
    }