Exemplo n.º 1
0
    public void UseAbility()
    {
        countDownToComplete      = TimeToComplete;
        countDownToFollowThrough = FollowThroughDelay;
        isInUse = true; //Update will detect this is true and run the StartUsingAbility function
        CharAbilityAction myAction = Instantiate(MyActionPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity) as CharAbilityAction;

        myAction.transform.SetParent(myCharacter.transform, false);
        myAction.MyAnimator = myCharacter.GetMyAnimator();
        myAction.MakeAction(); //The animation will begin
    }
Exemplo n.º 2
0
 public void SetCharAction(CharAbilityAction action)
 {
     MyActionPrefab = action;
 }