// Use this for initialization void Start() { hero = GameObject.FindGameObjectWithTag("Hero"); playerController = hero.GetComponent <PlayerController>(); weapon = gameObject.GetComponentInChildren <Weapon>(); rb = GetComponent <Rigidbody2D>(); frontCheck = transform.Find("frontCheck"); PeriodicDamageDriver = new PeriodicDamageDriver(this); PickupDropDriver = new PickupDropDriver(DropablePickups); if (Random.Range(0, 2) == 0) { Flip(); } StartCoroutine(CheckObstacle()); }
// Use this for initialization void Start() { PickupDropDriver = new PickupDropDriver(DropablePickups); }