private void Start()
 {
     physicsEngine         = GameObject.FindObjectOfType <PhysicsEngine>();
     localCollisionManager = GetComponent <LocalCollisionManager>();
     if (hasGrappler)
     {
         grappler = this.gameObject.GetComponentInChildren <Grappler>();
     }
 }
Example #2
0
        private void Start()
        {
            start();

            health          = 4;
            deathTimeLength = 2.0f;
            canRespawn      = true;
            spawn           = playerSpawn;

            grappler        = GetComponentInChildren <Grappler>();
            grappler.target = GameObject.FindGameObjectWithTag("Cursor");

            localPhysicsEngine.JumpStart_Event += JumpStart;
            localPhysicsEngine.HitTop_Event    += HitTop;
            localPhysicsEngine.HitBottom_Event += HitBottom;
            localPhysicsEngine.HitRight_Event  += HitRight;
            localPhysicsEngine.HitLeft_Event   += HitLeft;
        }
Example #3
0
 void Start()
 {
     grappler = GetComponentInParent <Grappler>();
     rb       = GetComponentInParent <Rigidbody2D>();
 }
Example #4
0
 // Start is called before the first frame update
 void Start()
 {
     grappler      = GetComponentInParent <Grappler>();
     physicsEngine = GameObject.FindObjectOfType <PhysicsEngine>();
 }
 private void Start()
 {
     start();
     grappler        = GetComponentInChildren <Grappler>();
     grappler.target = GameObject.FindGameObjectWithTag("Cursor");
 }
Example #6
0
 private void Start()
 {
     lineRenderer            = GetComponent <LineRenderer>();
     lineRenderer.startWidth = tetherThickness;
     grappler = GetComponentInParent <Grappler>();
 }
Example #7
0
 private void Start()
 {
     spriteRenderer = GetComponent <SpriteRenderer>();
     grappler       = GetComponentInParent <Grappler>();
     hook           = grappler.GetComponentInChildren <GrapplerHook>();
 }