Beispiel #1
0
 void Start()
 {
     if (coinCountText == null)
     {
         coinCountText = GameObject.Find("Coin count").GetComponent <Text>();
     }
     if (coinCanvasAnimator == null)
     {
         coinCanvasAnimator = GameObject.Find("Coin UI Parent").GetComponent <AnimatedObjectActiveHandler>();
     }
     coinCount = 0;
     SetCoinText();
 }
Beispiel #2
0
    void Start()
    {
        targetHighlightGraphics = Instantiate(targetHighlightGraphics, transform) as GameObject;
        targetAnimation         = targetHighlightGraphics.GetComponent <AnimatedObjectActiveHandler>();
        //InputManager.OnTabDown += OnTab;

        //create sphere collider
        detectionTrigger           = gameObject.AddComponent <SphereCollider>();
        detectionTrigger.isTrigger = true;
        detectionTrigger.radius    = detectionRange;

        //initialize nearbyEnemies list
        nearbyEnemies = new List <Creature>();
    }