Exemple #1
0
    private void Start()
    {
        speed      = originalSpeed;
        controller = GetComponent <CharacterController>();
        anim       = GetComponent <Animator>();
        // magnet = gameObject.GetComponent<Magnet>();

        // Magnet stuff
        //   coinDetectorobj = GameObject.FindGameObjectWithTag("CoinDetector");
        //  coinDetectorobj.SetActive(false);
        coinMoveScript = gameObject.GetComponent <CoinMove>();


        //origionroot
        //  gameObject.transform.SetParent(OrigionRoot.transform, false);
    }
Exemple #2
0
 // Start is called before the first frame update
 void Start()
 {
     playerTransform = GameObject.FindGameObjectWithTag("Player").transform;
     coinMoveScript  = gameObject.GetComponent <CoinMove>();
 }
 private void getCoin(CoinMove coin)
 {
     UiController.self.Coins += coin.quant;
     Destroy(coin.gameObject);
 }
Exemple #4
0
 private void getCoin(CoinMove coin)
 {
     UiController.self.Coins += coin.quant;
     _collector.CoinsCollected += coin.quant;
     coin.secureCoin();
 }
Exemple #5
0
 void Start()
 {
     coinMove = GetComponent <CoinMove>();
     coin     = gameObject;
 }