private void Start() { physicsEngine = GameObject.FindObjectOfType <PhysicsEngine>(); localCollisionManager = GetComponent <LocalCollisionManager>(); if (hasGrappler) { grappler = this.gameObject.GetComponentInChildren <Grappler>(); } if (hasProjectileLauncher) { projectileLauncher = this.gameObject.GetComponentInChildren <ProjectileLauncher>(); } }
void Start() { projectileLauncher = GetComponentInParent <ProjectileLauncher>(); rb = GetComponentInParent <Rigidbody2D>(); }