예제 #1
0
 private void Start()
 {
     GO            = GetComponent <GameObj>();
     panelHP       = panels[0].GetComponentInChildren <Text>();
     MultiSelectGO = GameObject.FindGameObjectWithTag("GameController");
     control       = MultiSelectGO.GetComponent <ResControl>();
 }
    // Start is called before the first frame update
    void Start()
    {
        GameObj    thisGO       = GetComponent <GameObj>();
        GameObject ScriptResurs = GameObject.FindGameObjectWithTag("GameController");
        ResControl resurs       = ScriptResurs.GetComponent <ResControl>();

        resurs.NewBuild(thisGO, thisGO.IsFriend());
    }
예제 #3
0
    private void Start()
    {
        thisGO      = GetComponent <Unit>();
        animator    = GetComponent <Animator>();
        unitControl = GetComponent <UnitControl>();

        GameObject ScriptResurs = GameObject.FindGameObjectWithTag("GameController");

        resurs = ScriptResurs.GetComponent <ResControl>();

        StartCoroutine(AttackFoo());
    }
예제 #4
0
    void Start()
    {
        MaxHP      = HP = 500;
        GoldCost   = 500;
        Resistance = 4;

        thisGO = GetComponent <GameObj>();

        GameObject GO = GameObject.FindGameObjectWithTag("GameController");

        resources = GO.GetComponent <ResControl>();

        StartCoroutine(Goldfarm());
    }
예제 #5
0
    // Start is called before the first frame update
    void Start()
    {
        MainCamera = Camera.main;
        animator   = GetComponent <Animator>();
        sprite     = GetComponent <SpriteRenderer>();
        agent      = GetComponent <NavMeshAgent>();
        controller = new NavMeshPath();
        thisGO     = GetComponent <Unit>();
        hit.point  = thisGO.transform.position;

        GameObject GO = GameObject.FindGameObjectWithTag("GameController");

        resurs = GO.GetComponent <ResControl>();
        resurs.NewUnit(thisGO, thisGO.IsFriend());

        if (!thisGO.IsFriend())
        {
            positionTower = resurs.TowerFriend.transform;
        }
    }
 // Start is called before the first frame update
 void Start()
 {
     GO  = GameObject.FindGameObjectWithTag("GameController");
     res = GO.GetComponent <ResControl>();
 }
예제 #7
0
 private void Start()
 {
     resources = GetComponent <ResControl>();
 }