Esempio n. 1
0
 private void createIndicator()
 {
     if (!spaceCarrier.isVisible && offscreenIndicator == null)
     {
         offscreenIndicator = Instantiate(OffscreenIndicatorPrefab);
         offscreenIndicator.setSpaceCarrier(spaceCarrier);
         return;
     }
     if (spaceCarrier.isVisible && offscreenIndicator != null)
     {
         destroyIndicator();
         offscreenIndicator = null;
     }
 }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        game            = FindObjectOfType <GameController>();
        timeLeft        = duration;
        hud             = FindObjectOfType <HUDManager>();
        visitorMangager = FindObjectOfType <VisitorManager>();
        if (gameObject.GetComponent <Animator>())
        {
            isAnimation = true;
        }
        audioSource = gameObject.AddComponent <AudioSource>();

        transform.localEulerAngles = Vector3.zero;
        waitingCountText.transform.parent.eulerAngles = Vector3.zero;

        GameObject indicator = Instantiate(game.offscreenAttractionIndicator);

        myIndicator = indicator.GetComponent <OffscreenIndicator>();
        myIndicator.SetTarget(this.transform);
        myIndicator.transform.SetParent(this.transform, false);
        myIndicator.gameObject.SetActive(false);
    }
Esempio n. 3
0
 protected override void OnSpawn()
 {
     base.OnSpawn();
     Instance = this;
 }