Esempio n. 1
0
 protected override void Start()
 {
     base.Start();
     if (!car)
     {
         car = GetComponentInParent <ArcadeCarController>();
     }
 }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     if (!cam)
     {
         cam = GetComponentInChildren <Camera>();
     }
     if (!car)
     {
         car = FindObjectOfType <ArcadeCarController>();
     }
     origLocalPos = cam.transform.localPosition;
 }
Esempio n. 3
0
    void StartBuild()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
        }

        if (!car)
        {
            car = FindObjectOfType <CND.Car.ArcadeCarController>();
        }
        enabled = car;

        if (!particlesCamera)
        {
            particlesCamera = Camera.main.transform.GetChild(0).GetComponent <Camera>();
        }

        Canvas canvas = GetComponent <Canvas>();

        canvas.renderMode  = RenderMode.ScreenSpaceCamera;
        canvas.worldCamera = Camera.main;

        chrono.SetActive(afficheChrono && !GameManager.instance.practise);

        colorBoost = boost[0].color;

        pInput = Rewired.ReInput.players.GetPlayer(0);

        pauseButtons[0].onClick.AddListener(Resume);
        pauseButtons[1].onClick.AddListener(ReStart);
        pauseButtons[2].onClick.AddListener(Quit);

        endButtons[0].onClick.AddListener(ReStart);
        endButtons[1].onClick.AddListener(SaveGhost);
        endButtons[2].onClick.AddListener(Quit);

        Pause = false;

        fin.SetActive(false);
    }
Esempio n. 4
0
    // Use this for initialization
    void Start()
    {
        if (!car)
        {
            car = GetComponentInParent <CND.Car.ArcadeCarController>();
        }

        if (particleEffects.IsNotNull())
        {
            boostFXManagers = new FXManager[anchors.Length];
            for (int i = 0; i < anchors.Length; ++i)
            {
                boostFXManagers[i]             = anchors[i].gameObject.AddComponent <FXManager>();
                boostFXManagers[i].autoDestroy = false;
                foreach (var ps in particleEffects)
                {
                    var nextPs = ps.CleanInstantiateClone();
                    boostFXManagers[i].particleEffects.Add(nextPs);
                    nextPs.transform.SetParent(anchors[i], false);
                }
                boostFXManagers[i].Stop();
            }
        }
    }
Esempio n. 5
0
        //public ButtonProperty save = ButtonProperty.Create("test", ()=> { ButtonTest(); });


        public void BindCar(ArcadeCarController car)
        {
            this.car = car;
        }
Esempio n. 6
0
 protected override void Start()
 {
     base.Start();
     car = m_Target.GetComponentInChildren <ArcadeCarController>();
 }