You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1019 B
C#

1 year ago
using MoreMountains.Tools;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MoreMountains.CorgiEngine
{
public class AbilitiSwitcher : CharacterAbility
{
[Header("First Ability")]
public CharacterAbility FirstAbility;
[Header("Second Ability")]
public CharacterAbility SecondAbility;
protected override void Initialization()
{
base.Initialization();
FirstAbility.AbilityPermitted = true;
SecondAbility.AbilityPermitted = false;
}
protected override void HandleInput()
{
if (Input.GetMouseButtonDown(1))
{
Swap();
}
}
protected virtual void Swap()
{
FirstAbility.AbilityPermitted = !FirstAbility.AbilityPermitted;
SecondAbility.AbilityPermitted = !SecondAbility.AbilityPermitted;
GUIManager.Instance.SpawBarPosition();
}
}
}