예제 #1
0
 private void Awake()
 {
     if (sharedInstace == null)
     {
         sharedInstace = this;
     }
 }
예제 #2
0
    // Use this for initialization
    private void Start()
    {
        if (spawnner == null)
        {
            spawnner = gameObject.GetComponentInChildren <BatterySpawner>();
        }

        //Debug.Log("Is this start running");
        audio = gameObject.AddComponent <AudioSource>();
        SetState(GameState.Begin);
    }
예제 #3
0
    private void Start()
    {
        gi = GameInfo.autoRef;
        if (!gi)
        {
            Debug.LogError("CarryBattery.cs: Script GameInfo n'a pas d'auto-référence statique !");
        }

        animator        = GetComponentInChildren <Animator>();
        audioController = GetComponent <audioController>();
        movement        = GetComponent <PlayerMovement>();
        batterySpawner  = GameObject.FindGameObjectWithTag("SpawnBattery").GetComponent <BatterySpawner>();
    }