Example #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);
    }
Example #2
0
 // Start is called before the first frame update
 void Start()
 {
     playerTransform = GameObject.FindGameObjectWithTag("Player").transform;
     coinMoveScript  = gameObject.GetComponent <CoinMove>();
 }
Example #3
0
 private void getCoin(CoinMove coin)
 {
     UiController.self.Coins += coin.quant;
     Destroy(coin.gameObject);
 }
Example #4
0
 private void getCoin(CoinMove coin)
 {
     UiController.self.Coins += coin.quant;
     _collector.CoinsCollected += coin.quant;
     coin.secureCoin();
 }
Example #5
0
 void Start()
 {
     coinMove = GetComponent <CoinMove>();
     coin     = gameObject;
 }