Beispiel #1
0
    /// <summary>
    /// User trigger delegate for the live animation
    /// </summary>
    /// <param name="utEvent">Event sent by the animation</param>
    public void LiveUserTrigger(UserTriggerEvent utEvent)
    {
        if (utEvent.tag == "Hit Finished")
        {
            // if the event was a finished hit, then set the pasta
            // to a waiting to move state

            State = STATE.WaitingToMove;
        }
        else if (utEvent.tag == "Killable")
        {
            // if the event was a killable event, then make the collider active
            // (the collider starts out inactive when the pasta is spawning)

#if UNITY_3_5
            colliderGameObject.active = true;
#else
            colliderGameObject.SetActive(true);
#endif
        }
        else if (utEvent.tag == "Spawned")
        {
            // if the event is that the pasta has spawned, then
            // set its state to waiting to move

            State = STATE.WaitingToMove;
        }
    }
Beispiel #2
0
 public void testUserTrigger(UserTriggerEvent triggerEvent)
 {
     if( triggerEvent.boneName == "Bras a g")
     {
     //			Debug.Log("UserTrigger Triggered");
     }
 }
Beispiel #3
0
    /// <summary>
    /// This is the delegate that will be called when user triggers are processed by the animation
    /// </summary>
    /// <param name="utEvent">The user trigger event that occurred</param>
    public void UserTrigger(UserTriggerEvent utEvent)
    {
        if (utEvent.tag == "Dead")
        {
            // The user trigger's tag was "Dead", so we tell the FXManager that this FX needs to be recycled

            _gameManager.fxManager.KillFX(this);
        }
    }
Beispiel #4
0
    /// <summary>
    /// User trigger delegate for the live animation
    /// </summary>
    /// <param name="utEvent">Event sent by the animation</param>
    public void LiveUserTrigger(UserTriggerEvent utEvent)
    {
        if (utEvent.tag == "Hit Finished")
        {
            // if the event was a finished hit, then set the pasta
            // to a waiting to move state

            State = STATE.WaitingToMove;
        }
        else if (utEvent.tag == "Killable")
        {
            // if the event was a killable event, then make the collider active
            // (the collider starts out inactive when the pasta is spawning)

            colliderGameObject.active = true;
        }
        else if (utEvent.tag == "Spawned")
        {
            // if the event is that the pasta has spawned, then
            // set its state to waiting to move

            State = STATE.WaitingToMove;
        }
    }
Beispiel #5
0
    /// <summary>
    /// This is the delegate that will be called when user triggers are processed by the animation
    /// </summary>
    /// <param name="utEvent">The user trigger event that occurred</param>
    public void UserTrigger(UserTriggerEvent utEvent)
    {
        if (utEvent.tag == "Dead")
        {
            // The user trigger's tag was "Dead", so we tell the FXManager that this FX needs to be recycled

            _gameManager.fxManager.KillFX(this);
        }
    }
Beispiel #6
0
    void HandleAnimationTag(UserTriggerEvent triggerEvent)
    {
        ExceptionTool.Execute(delegate()
        {
            string[] tags = StringTool.SplitWithDepth(triggerEvent.tag, '(', ')', ';');
            foreach (var entity in tags)
            {
                if (entity == "action")
                {
                    if (motionActions != null)
                    {
                        motionActions[triggerEvent.tag](triggerEvent);
                    }
                }
                else if (entity.RemoveWhiteSpace().StartsWith("CutIn="))
                {
                    string[] keyValue = entity.RemoveWhiteSpace().Split('=');
                    Assert.IsTrue(keyValue.Length == 2);

                    if (MenuInGame.CutInStarter != null)
                    {
                        MenuInGame.CutInStarter(keyValue[1]);
                    }
                }
                else
                {
                    AttachResource(entity, false);
                }
            }
        });
    }
Beispiel #7
0
 void HandleAnimationTag(UserTriggerEvent triggerEvent)
 {
     ExceptionTool.Execute(delegate()
     {
         string[] tags = StringTool.SplitWithDepth(triggerEvent.tag, '(', ')', ';');
         foreach (var entity in tags)
         {
             if (entity == "action")
             {
                 if (motionActions != null)
                 {
                     motionActions[triggerEvent.tag](triggerEvent);
                 }
             }
             else
             {
                 AttachResource(entity, false);
             }
         }
     });
 }