예제 #1
0
    private void Awake()
    {
        animator = GetComponent <Animator>();
        agent    = GetComponent <NavMeshAgent>();

        GameObject.FindWithTag("MiniMap").GetComponent <MiniMapSystem>().Attach(this.transform.gameObject);

        Transform[] childs = GetComponentsInChildren <Transform>();

        foreach (Transform child in childs)
        {
            if (child.name.Contains("Cannon_end"))
            {
                gunbarrel = child.gameObject;
                break;
            }
        }

        goal = GameObject.Find(this.transform.tag == "Red" ? "Nexus_blue" : "Nexus_red");

        agent.SetDestination(goal.transform.position);
        unitTag    = UnitsTag.Minion;
        UnitStatus = Status.Initialize(minionSiegeData.initStatus);
        HUD        = GetComponentInChildren <HUD__HP>();
    }
예제 #2
0
    private void Awake()
    {
        animator = this.GetComponent <Animator>();
        agent    = this.GetComponent <NavMeshAgent>();

        GameObject.FindWithTag("MiniMap").GetComponent <MiniMapSystem>().Attach(this.transform.gameObject);

        goal = GameObject.Find(this.transform.tag == "Red" ? "Nexus_blue" : "Nexus_red");

        agent.SetDestination(goal.transform.position);

        unitTag = UnitsTag.Minion;

        UnitStatus = Status.Initialize(minionMeleeData.initStatus);

        HUD = GetComponentInChildren <HUD__HP>();

        StaffCol.transform.GetComponent <Staff>().init(this.GetComponent <Minion_melee>());
    }