Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        m_refCollectibleManager = m_gfuel.GetComponent <CollectibleManager>();

        m_textTankPosition.text = m_gTank.transform.position.ToString();
        m_textFuelPosition.text = m_refCollectibleManager.m_vec3FuelPosition.ToString();
    }
Пример #2
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
 void Awake()
 {
     m_collectibleManagerComponent = m_collectibleManager.GetComponent<CollectibleManager>();
     m_platformsManagerComponent = m_platformsManager.GetComponent<PlatformsManager>();
     m_ringManagerComponent = m_ring.GetComponent<RingManager>();
     m_forceUpdateLevel = false;
 }
Пример #4
0
 void Awake()
 {
     m_collectibleManagerComponent = m_collectibleManager.GetComponent <CollectibleManager>();
     m_platformsManagerComponent   = m_platformsManager.GetComponent <PlatformsManager>();
     m_ringManagerComponent        = m_ring.GetComponent <RingManager>();
     m_forceUpdateLevel            = false;
 }
Пример #5
0
    // Use this for initialization
    void Start()
    {
        _adsManager         = GetComponent <AdsManager>();
        _settingsManager    = GetComponent <SettingsManager>();
        _collectibleManager = GetComponent <CollectibleManager>();

        _state = GameState.MainMenu;
        GUI_mainMenu.gameObject.SetActive(true);
        GUI_inGame.gameObject.SetActive(false);

        _camera           = Camera.main.GetComponent <CameraFollow> ();
        _spawnPosition    = _camera.transform.position;
        _spawnPosition.y -= Camera.main.orthographicSize - _playerYOffset;
        _spawnPosition.z  = 0;


        _adsManager.CreateAdBanner();

        for (int i = 0; i < destructors.Length; i++)
        {
            destructors [i].Reset += OnReset;
        }

        _gameServiceManager = GetComponent <GameServiceManager>();
        _gameServiceManager.Init();
        _gameServiceManager.SignIn();

        GameSettings.sensitivity = PlayerPrefs.GetFloat(Constants.SETTINGS_SENSITIVITY, 1);
    }
Пример #6
0
    void Awake()
    {
        manager = this;

        playerManager = GetComponent<PlayerManager>();
        collectibleManager = GetComponent<CollectibleManager> ();
    }
Пример #7
0
    private void Start()
    {
        carrotManager = GameObject.FindGameObjectWithTag("CarrotManager").GetComponent <CollectibleManager>();
        audioManager  = GameObject.FindGameObjectWithTag("AudioManager").GetComponent <AudioManager>();

        if (audioManager != null)
        {
            collectEffect = GameObject.Find("CollectEffect").GetComponent <AudioSource>();
        }
    }
Пример #8
0
 private void OnTriggerEnter(Collider other)
 {
     Debug.Log("YOU GAIN A EXTRA POINT!");
     if (other.gameObject.tag == "Collection")
     {
         Debug.Log("YOU GAIN A EXTRA POINT!");
         other.gameObject.GetComponent <Light>().intensity = 0;
         other.gameObject.SetActive(false);
         GameObject         g   = GameObject.Find("Main Camera");
         CollectibleManager mng = g.GetComponent <CollectibleManager> ();
         mng.ItemCollected();
         Debug.Log(mng.itemCount);
     }
 }
Пример #9
0
 // Use this for initialization
 void Start()
 {
     player = GameObject.Find("Player");
     pc2d   = player.GetComponent <PlatformerCharacter2D>();
     cm     = player.GetComponent <CollectibleManager>();
 }
 private void Awake()
 {
     Instance = this;
 }
Пример #11
0
 // Use this for initialization
 void Start()
 {
     cm = FindObjectOfType<CollectibleManager> ();
 }
Пример #12
0
 public void SetManager(CollectibleManager newManager)
 {
     manager = newManager;
 }
Пример #13
0
 void Start()
 {
     _collectibleManager = FindObjectOfType <CollectibleManager>();
     _sprite             = GetComponent <SpriteRenderer>();
 }
 void Start()
 {
     m_collectibleManagerComponent = m_collectibleManager.GetComponent<CollectibleManager>();
     m_collectibleManagerComponent.AddSpawnPosition(m_trans);
 }
Пример #15
0
 void Start()
 {
     m_collectibleManagerComponent = m_collectibleManager.GetComponent <CollectibleManager>();
     m_collectibleManagerComponent.AddSpawnPosition(m_trans);
 }