void Awake() { cam = Camera.main.GetComponent<CameraControl>(); playerMove = GetComponent<PlayerMove>(); jumpControl = GetComponent<JumpControl>(); dashControl = GetComponent<DashControl>(); characterController = GetComponent<CharacterController>(); }
// 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>(); }
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>(); }
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; }
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>(); }
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>(); }
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>(); }
public void TearDown() { _testModel = null; _testObj = null; _testGroundCheck = null; }