Beispiel #1
0
    // Use this for initialization
    protected override void Start()
    {
        base.Start();
        //sm = new StateMachine();

        sm.AddState(new EnemyStates.Idle(this));
        sm.AddState(new EnemyStates.Movement(this));
        sm.AddState(new EnemyStates.Attack(this));

        int temp = Random.Range(0, blessing_list.Length);

        chosen_blessing = Instantiate(blessing_list[temp], transform.position, blessing_list[temp].transform.rotation);
        chosen_blessing.GetComponent <Blessing>().SetBlessingType(((Blessing.TYPE)temp + 6));
        chosen_blessing.SetActive(false);

        theUIcanvas = GameObject.FindGameObjectWithTag("UI");
        uiScript    = theUIcanvas.GetComponent <UIScript>();
        uiScript.BossMax(MAX_HP);
        SpawnBossHPActive();
    }