public void startAim()
 {
     if (!isAiming && levController.isGrounded && !levController.isJumping && currentAmmo != null)
     {
         isAiming = true;
         levController.setInputEnable(false);
         levController.stopMoving();
         levController.levAnimator.CrossFade("Base Layer.Aim." + currentAmmo.aimAnimation, 0.1f, 0, 0);
         if (prepareShootCoroutine != null)
         {
             StopCoroutine(prepareShootCoroutine);
         }
         prepareShootCoroutine = StartCoroutine(prepareShoot(0.1f));
     }
 }
Ejemplo n.º 2
0
    IEnumerator DelayEnd()
    {
        yield return(new WaitForEndOfFrame());

        lev.setInputEnable(false);

        yield return(new WaitForSeconds(14));

        //SHOULD NOT RESET ALL!!
        GameDataManager.shared().Reset();
        //SHOULD NOT RESET ALL!!

        GameDataManager.shared().LOCAL_IsLoadOpening = true;
        print(GameDataManager.shared().MyuuJournalState.ToString());
        if (GameDataManager.shared().MyuuJournalState == MyuuJournalState.None)
        {
            GameDataManager.shared().MyuuJournalState = MyuuJournalState.First;
            GameDataManager.shared().Save(GameDataManager.GameDataType.MyuuData);
        }

        GameDataManager.shared().SaveGameExist  = false;
        GameDataManager.shared().PlayerLocation = new LocationModel(nextScene, LocationType.Start);

        SceneManager.LoadScene(nextScene);
        MainObjectSingleton.DestoryAllInstance();
    }
Ejemplo n.º 3
0
    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());
        }
    }
Ejemplo n.º 4
0
    public void Die(DieCausesType causes)
    {
        this.causes = causes;
        levController.setInputEnable(false);
        levController.stopMoving();

        PlayCustomAnimation(causes);
    }
Ejemplo n.º 5
0
 void ForceLevMove(GameObject sender)
 {
     levC.setInputEnable(false);
     levC.stopMoving();
     StartCoroutine(MoveLev(levC));
     if (levC != null)
     {
         levC.OnCustomAnimationFinished -= ForceLevMove;
     }
 }
Ejemplo n.º 6
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);
        }
    }
Ejemplo n.º 7
0
 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);
     }
 }
Ejemplo n.º 8
0
 public override void UpdateTime(GameObject Actor, float time, float deltaTime)
 {
     levController.setInputEnable(inputEnable);
 }