You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1003 B
41 lines
1003 B
using System.IO;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class SkillManager : MonoBehaviour
|
|
{
|
|
bool skillsGUIValue = false;
|
|
public Skill currentSkill = null;
|
|
GameObject skillsGUI;
|
|
Character self;
|
|
private void Start()
|
|
{
|
|
skillsGUI = transform.Find("SkillsGUI").gameObject;
|
|
self = transform.parent.GetComponent<Character>();
|
|
}
|
|
public void SetSkillsGUI()
|
|
{
|
|
skillsGUIValue = !skillsGUIValue;
|
|
skillsGUI.SetActive(skillsGUIValue);
|
|
}
|
|
public void SetSkillsGUIActive(bool value)
|
|
{
|
|
skillsGUIValue = value;
|
|
skillsGUI.SetActive(value);
|
|
}
|
|
public void SetCurrentSkill(Skill skill)
|
|
{
|
|
currentSkill = skill;
|
|
currentSkill.SetRotation(self.GetLookDirection());
|
|
}
|
|
public bool GetGameObjectValue()
|
|
{
|
|
return skillsGUIValue;
|
|
}
|
|
public void SetCurrentSkillFalse()
|
|
{
|
|
currentSkill.gameObject.SetActive(false);
|
|
}
|
|
}
|