Example #1
0
 void Awake()
 {
     cam = Camera.main.GetComponent<CameraControl>();
     playerMove = GetComponent<PlayerMove>();
     jumpControl = GetComponent<JumpControl>();
     dashControl = GetComponent<DashControl>();
     characterController = GetComponent<CharacterController>();
 }
Example #2
0
 // Start is called before the first frame update
 void Start()
 {
     jumpControl         = GetComponent <JumpControl>();
     characterController = GetComponent <CharacterController>();
     controlInteract     = GetComponent <ControlInteract>();
     playerMove          = GetComponent <PlayerMove>();
     createWall          = GetComponent <CreateWallPlayer>();
     inputControl        = InputControl.instance;
     rb = GetComponent <Rigidbody>();
 }
Example #3
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>();
 }
Example #4
0
 private void ArrangeTestEnvironment(short airJump, float jumpForce, bool onGround)
 {
     _testModel = new JumpModel()
     {
         AirJumpLimit = airJump, JumpForce = jumpForce
     };
     _testObj         = new JumpControl(_testModel.Value);
     _testGroundCheck = new GroundDetectionControl {
         OnGround = onGround
     };
     _testObj.GroundDetection = _testGroundCheck;
 }
Example #5
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>();
 }
Example #6
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>();
 }
Example #7
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>();
 }
Example #8
0
 public void TearDown()
 {
     _testModel       = null;
     _testObj         = null;
     _testGroundCheck = null;
 }