コード例 #1
0
 private void FindPlayerParts()
 {
     player         = GameObject.FindGameObjectWithTag("Player").GetComponent <LateralMovement>();
     playerRenderer = player.getSprite();
     frogAnim       = playerRenderer.GetComponent <AnimateFrog>();
     jumpControl    = player.GetComponent <JumpControl>();
     FindPlayerColliders();
     hand       = transform.parent.gameObject;
     mouseAimer = hand.GetComponent <AimAtMouse>();
     body       = GameObject.FindGameObjectWithTag("Player").GetComponent <Rigidbody2D>();
 }
コード例 #2
0
 private void FindPlayerParts()
 {
     jump            = GetComponent <JumpControl>();
     characterSprite = GetComponentInChildren <SpriteRenderer>().gameObject;
     frogAnim        = characterSprite.GetComponent <AnimateFrog>();
     hand            = characterSprite.GetComponentInChildren <AimAtMouse>().gameObject;
     hookshotControl = hand.GetComponentInChildren <HookshotControl>();
     wallSensorRight = GameObject.Find("WallSensorR").GetComponent <WallSensor>();
     wallSensorLeft  = GameObject.Find("WallSensorL").GetComponent <WallSensor>();
     ceilingSensor   = GameObject.Find("CeilingSensor").GetComponent <CeilingSensor>();
     relative        = GameObject.Find("GroundColliders").GetComponent <RelativeVelocity>();
 }
コード例 #3
0
ファイル: HookshotControl.cs プロジェクト: kjarosz/Hookshot
 private void FindPlayerParts()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent<LateralMovement>();
     playerRenderer = player.getSprite();
     frogAnim = playerRenderer.GetComponent<AnimateFrog>();
     jumpControl = player.GetComponent<JumpControl>();
     FindPlayerColliders();
     hand = transform.parent.gameObject;
     mouseAimer = hand.GetComponent<AimAtMouse>();
     body = GameObject.FindGameObjectWithTag("Player").GetComponent<Rigidbody2D>();
 }
コード例 #4
0
ファイル: LateralMovement.cs プロジェクト: kjarosz/Hookshot
 private void FindPlayerParts()
 {
     jump = GetComponent<JumpControl>();
     characterSprite = GetComponentInChildren<SpriteRenderer>().gameObject;
     frogAnim = characterSprite.GetComponent<AnimateFrog>();
     hand = characterSprite.GetComponentInChildren<AimAtMouse>().gameObject;
     hookshotControl = hand.GetComponentInChildren<HookshotControl>();
     wallSensorRight = GameObject.Find("WallSensorR").GetComponent<WallSensor>();
     wallSensorLeft = GameObject.Find("WallSensorL").GetComponent<WallSensor>();
     ceilingSensor = GameObject.Find("CeilingSensor").GetComponent<CeilingSensor>();
     relative = GameObject.Find("GroundColliders").GetComponent<RelativeVelocity>();
 }