Skip to content

Feature3 movement#26

Open
manojkumar4799 wants to merge 2 commits intooutscal:masterfrom
manojkumar4799:Feature3-Movement
Open

Feature3 movement#26
manojkumar4799 wants to merge 2 commits intooutscal:masterfrom
manojkumar4799:Feature3-Movement

Conversation

@manojkumar4799
Copy link

No description provided.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Namespaces and class definition missing.


void Update()
{
isGrounded = Physics2D.OverlapCircle(groundcheckTansform.position, circleRadius, groundlayer);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The oncollisonstay or enter should be better than this code .


private void RunPlayer()
{
float playerXmovement = Input.GetAxisRaw("Horizontal");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

float playerXmovement = Input.GetAxisRaw("Horizontal");
if (Mathf.Abs(playerXmovement) == 1)

You can save calls if you check firstly the input of the player.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants