Пример #1
0
 // Use this for initialization
 void Start()
 {
     CSM         = GameObject.Find("BattleManager").GetComponent <CombatStateMachine>();
     enemy       = CSM.selectedEnemy;
     swordAttack = Instantiate(swordAttack, enemy.gameObject.transform.position, swordAttack.transform.rotation);
     CSM.graphicPanel.SetActive(true);
 }
Пример #2
0
    public void PressEndTurnButton()
    {
        CombatStateMachine c = Main.instance.GetCombatStateMachine();

        if (c.IsPlayerTurn() == true)
        {
            Main.instance.PlayerEndTurn();
        }
    }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     CSM = GameObject.Find("BattleManager").GetComponent <CombatStateMachine>();
     CSM.graphicPanel.GetComponent <Animator>().SetInteger("graphic", 4);
     totalRotation = 0;
     audioRef      = GameObject.Find("AudioManager").GetComponent <AudioBehavior>();
     target.Rotate(Vector3.forward * Random.Range(0, 7) * 22.5f);
     primed       = false;
     waitTime     = 0;
     currentState = State.ACTIVE;
 }
Пример #4
0
    private void Init()
    {
        string configPath = Application.dataPath + "/Resources/Configs";

        ConfigHandler.LoadConfigs(configPath);
        instance = this;
        mainUIController.Init();
        player             = LoadOrCreatePlayer();
        combatStateMachine = new CombatStateMachine();
        combatStateMachine.Init();
        timelineScriptController = MainUIController.instance.GetTimelineController().GetComponent <TimelineScriptController>();
    }
Пример #5
0
 void Start()
 {
     combatStateMachine = GetComponent <CombatStateMachine>();
     currentState       = States.MAP;
 }
Пример #6
0
 void Awake()
 {
     playerParty = new List<basePlayer>();
     enemyParty = new List<baseEnemy>();
     csm = GetComponent<CombatStateMachine>();
 }
 // Use this for initialization
 void Start()
 {
     audioRef     = GameObject.Find("AudioManager").GetComponent <AudioBehavior>();
     CSM          = GameObject.Find("BattleManager").GetComponent <CombatStateMachine>();
     currentState = states.BEGIN;
 }
Пример #8
0
 // Use this for initialization
 void Start()
 {
     CSM = GameObject.Find("BattleManager").GetComponent <CombatStateMachine>();
 }