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); }
// 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); }
private void getCoin(CoinMove coin) { UiController.self.Coins += coin.quant; _collector.CoinsCollected += coin.quant; coin.secureCoin(); }
void Start() { coinMove = GetComponent <CoinMove>(); coin = gameObject; }