コード例 #1
0
 private void Start()
 {
     physicsEngine         = GameObject.FindObjectOfType <PhysicsEngine>();
     localCollisionManager = GetComponent <LocalCollisionManager>();
     if (hasGrappler)
     {
         grappler = this.gameObject.GetComponentInChildren <Grappler>();
     }
 }
コード例 #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;
        }
コード例 #3
0
 void Start()
 {
     grappler = GetComponentInParent <Grappler>();
     rb       = GetComponentInParent <Rigidbody2D>();
 }
コード例 #4
0
 // Start is called before the first frame update
 void Start()
 {
     grappler      = GetComponentInParent <Grappler>();
     physicsEngine = GameObject.FindObjectOfType <PhysicsEngine>();
 }
コード例 #5
0
 private void Start()
 {
     start();
     grappler        = GetComponentInChildren <Grappler>();
     grappler.target = GameObject.FindGameObjectWithTag("Cursor");
 }
コード例 #6
0
 private void Start()
 {
     lineRenderer            = GetComponent <LineRenderer>();
     lineRenderer.startWidth = tetherThickness;
     grappler = GetComponentInParent <Grappler>();
 }
コード例 #7
0
 private void Start()
 {
     spriteRenderer = GetComponent <SpriteRenderer>();
     grappler       = GetComponentInParent <Grappler>();
     hook           = grappler.GetComponentInChildren <GrapplerHook>();
 }