Пример #1
0
    private void PlayCustomAnimation(DieCausesType type)
    {
        string animationName = "DEATH.";
        float  delay         = 0.0f;

        switch (type)
        {
        case DieCausesType.Drown:
            animationName += "AC_Lev_Forest_Dead_Drown";
            break;

        case DieCausesType.Fall:

        case DieCausesType.DeepShadow:
            animationName += "AC_Lev_Forest_Dead_Drop_Fall";
            break;

        case DieCausesType.EatenByAtatar:
            animationName += "AC_Lev_NoGauntlet_Atatar_Dead1_Facing";
            animationName += levController.facingDirection.ToString();
            delay          = 0.2f;
            break;

        case DieCausesType.Rock:
            animationName += "AC_Lev_Dead_Generic";
            break;

        case DieCausesType.Moluvusha:
            animationName += "AC_Lev_Forest_Moluvusha_Dead";
            break;
        }

        levController.playCustomAnimation(animationName, delay);
    }
Пример #2
0
 public void pick()
 {
     heldPickable = getFirstPickableObject();
     if (heldPickable)
     {
         if (heldPickable.objectLayer == PickableObject.LayerObject.Back)
         {
             levController.turnToBackground();
         }
         else if (heldPickable.objectLayer == PickableObject.LayerObject.Front)
         {
             levController.turnToForeground();
         }
         levController.OnCustomAnimationFinished += handleOnPickFinished;
         levController.playCustomAnimation(heldPickable.pickAnimation);
         levController.stopMoving();
         heldPickable.OnStartLocked();
         isHoldingPickable = true;
     }
 }
Пример #3
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);
        }
    }
 void Start()
 {
     lev.playCustomAnimation("MAINMENU.AC_Lev_Closing");
     StartCoroutine(DelayEnd());
 }