예제 #1
0
 void Awake()
 {
     CreateInstance();
     CameraControl = GameObject.Find("GvrRoot").GetComponent <CameraControl>();
     Invoke("AddInputControl", 0.1f);
     uiControl = GameObject.Find("GameUIRoot").GetComponent <MainUIControl>();
 }
예제 #2
0
    void Start()
    {
        GlobalVaule     = GlobalVariables.Instance;
        UIscript        = UI_Control ? UI_Control.GetComponent <MainUIControl>() : null;
        PlayerUp_Road   = PlayerUP ? PlayerUP.GetComponentsInChildren <NavMeshModifier>() : null;
        PlayerDown_Road = PlayerDown ? PlayerDown.GetComponentsInChildren <NavMeshModifier>() : null;
        EnemyUp_Road    = EnemyUP ? EnemyUP.GetComponentsInChildren <NavMeshModifier>() : null;
        EnemyDown_Road  = EnemyDown ? EnemyDown.GetComponentsInChildren <NavMeshModifier>() : null;

        PlayerResources = 200;
        EnemyResources  = 200;

        PlayerMaxBase = 3000;
        EnemyMaxBase  = 3000;

        PlayerBaseHP = PlayerMaxBase;
        EnemyBaseHP  = EnemyMaxBase;


        PlayerControlResources = 0;
        EnemyControlResources  = 0;


        StartCoroutine(GetTargetListInSence());
        StartCoroutine(ResouresControl());
        StartCoroutine(EnemyRoadControl());

        StartCoroutine(EnemyControl_AI());
    }
예제 #3
0
 void Awake()
 {
     _instance = this;
 }