示例#1
0
    void Awake()
    {
        if (actorSelf == null)
        {
            Debug.Log("Warning! actorSelf not found.");
        }
        if (characterCamera == null)
        {
            Debug.Log("Warning! Main Camera not found.");
        }
        if (navAgent == null)
        {
            Debug.Log("Warning! NavMeshAgent not found.");
        }

        skillBar = actorSelf.getSkillBar();
        if (skillBar == null)
        {
            Debug.Log("Warning! skillBar not here after pulling from actor.");
            skillBar = new GameObject[8];
        }
        int index = 0;

        foreach (GameObject target in skillBar)
        {
            if (target != null)
            {
                Instantiate(target, skillSlots[index].transform).transform.SetSiblingIndex(0);
                index++;
            }
        }
    }