public override void InitLevel() { pointintHand = gameObject.transform.FindChild("PointingHand").gameObject; if(pointintHand == null) Debug.LogError("Pointing Hand not found"); lerp = pointintHand.GetComponent<TransformLerper>(); cannonFireScript = StatePinball.Instance.m_PinballMono.Cannon.GetComponent<CoinSpawnerB2_Final>(); fireTrigger = StatePinball.Instance.m_PinballMono.FireButton.GetComponent<CircleCollider2D>(); fireTrigger.enabled = false; startTutorial = true; }
// Use this for initialization void Awake() { spriteRenderer = GetComponent<SpriteRenderer>(); spawner = GameObject.Find("Pinball(Clone)").GetComponentInChildren<CoinSpawnerB2_Final>() as CoinSpawnerB2_Final; Physics2D.IgnoreCollision(Coin.GetComponent<Collider2D>(), GetComponent<Collider2D>()); }