void OnTriggerEnter(Collider col)
    {
        TorchUsable temp = col.GetComponent <TorchUsable> ();

        if (temp != null)
        {
            GetComponent <Collider> ().enabled = false;

            if (rainatar)
            {
                if (rainatar.isLevDied)
                {
                    return;
                }
                rainatar.isStillHauntingLev = false;
            }

            levC = MainObjectSingleton.shared(MainObjectType.Player).GetComponent <LevController> ();
            levC.setInputEnable(false);
            levC.stopMoving();
            levC.OnCustomAnimationFinished += ForceLevMove;

            burnedRope.GetComponentsInChildren <BurnedRopeParticle> ().ForEach(t => t.LightMyFire());
        }
    }
Exemple #2
0
    void Start()
    {
        levController      = GetComponentInParent <LevController> ();
        gauntletController = levController.levGauntletController;

        zRootObject.SetActive(false);
        startingBoneDistance = (trunkList[1].localPosition - trunkList[0].localPosition).magnitude;
    }
Exemple #3
0
    void OnTriggerEnter(Collider col)
    {
        LevController levC = MainObjectSingleton.shared(MainObjectType.Player).GetComponent <LevController> ();

        if (col.CompareTag("Player") && levC.GetComponentInChildren <TorchUsable>() == null)
        {
            levC.lookBack();
            StartCoroutine(StopLookback(levC));
        }
    }
Exemple #4
0
    IEnumerator StopLookback(LevController lev)
    {
        float waktu = delayLookback;

        while (lev.facingDirection == LevController.Direction.Right && lev.isGrounded && !lev.isJumping && lev.levAnimator.GetFloat("horizontalSpeed") > 0.01f && waktu > 0f)
        {
            waktu -= Time.deltaTime;
            yield return(null);
        }
        lev.stopLookBack();
    }
    public override void End(GameObject Actor)
    {
        if (Actor != null)
        {
            levController = Actor.GetComponent <LevController>();

            levController.levSetting.runAcceleration = deceleration;
            levController.stopMoving();
            StartCoroutine(RestoreAcceleration());
        }
    }
Exemple #6
0
    void OnTriggerEnter(Collider other)
    {
        LevController levC = MainObjectSingleton.shared(MainObjectType.Player).GetComponent <LevController> ();

        if (other.CompareTag("Player") && levC.GetComponentInChildren <TorchUsable>() != null)
        {
            levC.lookBack();
            StartCoroutine(StopLookback(levC));
//			startY = plank.transform.position.y;
//			CreateItween ();
        }
    }
Exemple #7
0
    void OnTriggerEnter(Collider col)
    {
        LevController temp = col.GetComponentInParent <LevController> ();

        if (temp != null && col.CompareTag("Player"))
        {
            if (!isTriggered)              //lev die
            {
                isTriggered = true;
                raitata.SpeedUp();
            }
        }
    }
 public override void End(GameObject Actor)
 {
     if (Actor != null)
     {
         levController = Actor.GetComponent <LevController>();
         if (levController == null)
         {
             Debug.LogError("Actor is does not have Lev Controller");
             return;
         }
         levController.OnCustomAnimationFinished -= LevController_OnCustomAnimationFinished;
         levController.setInputEnable(!inputEnable);
     }
 }
    // Use this for initialization
    void Start()
    {
        levController = GetComponent <LevController> ();
        isAiming      = false;

        for (int i = 0; i < ammo.Length; i++)
        {
            ammo[i].ammoObject = GameObject.Instantiate(ammo[i].ammoPrefab);
            ammo[i].ammoObject.transform.SetParent(levController.transform, false);
            ammo[i].ammoObject.SetActive(false);
        }

        setCurrentAmmo(GauntletType.Zroot);
    }
Exemple #10
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;
            }

            levController.setInputEnable(true);
        }
    }
Exemple #11
0
 IEnumerator Start()
 {
     isLevDied           = false;
     isStillHauntingLev  = true;
     FinishBlendToAtatar = false;
     dieTrig             = this.GetComponent <L02DieAtatarTrigger> ();
     Lev = FindObjectOfType <LevController> ();
     while (Lev == null)
     {
         Lev = FindObjectOfType <LevController> ();
         yield return(null);
     }
     StartCoroutine(AttackMiss());
 }
Exemple #12
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;
            }

            levController.playCustomAnimation(GetAnimStringName(CutsceneType), 0.25f);
        }
    }
    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;
            }

            originAcceleration = levController.levSetting.runAcceleration;
            levController.levSetting.runAcceleration = deceleration;
            levController.stopMoving();
            StartCoroutine(RestoreAcceleration());
        }
    }
    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;
            }
        }
    }
    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;
            }
        }
    }
Exemple #16
0
    void Start()
    {
        //ONLY SPAWN LEV WHEN NO OBJECT WITH TAG PLAYER
        if (MainObjectSingleton.shared(MainObjectType.Player) != null)
        {
            return;
        }

        LocationModel levSpawnPosition = GetLevSpawnPosition();
        Transform     atTransform      = sController.GetSpawnPosition(levSpawnPosition.location);


        // if location == start.. AUTO SET CAMERA WILL BE FORCED.
        if (levSpawnPosition.location == LocationType.Start)
        {
            autoSetCameraOnArrived = true;
        }

        lev = SpawnLev(atTransform).GetComponent <LevController>();
        ApplySetting();
    }
    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;
    }
Exemple #18
0
 void Start()
 {
     levController            = GetComponentInParent <LevController> ();
     levController.OnLanding += LevController_OnLanding;
 }
Exemple #19
0
 void Start()
 {
     levController = GetComponentInParent <LevController> ();
     pickables     = new List <PickableObject> ();
     usables       = new List <UsableObject> ();
 }
Exemple #20
0
 void Awake()
 {
     levController = this.GetComponent <LevController>();
 }