Fixed typo in Enemy
Fixed NRE in Mover
This commit is contained in:
parent
3f260fc79d
commit
505715a368
5 changed files with 8 additions and 7 deletions
|
@ -60,7 +60,7 @@
|
|||
<Compile Include="Assets\Scripts\AbstractShooter.cs" />
|
||||
<Compile Include="Assets\Scripts\BasicShooter.cs" />
|
||||
<Compile Include="Assets\Scripts\Bullet.cs" />
|
||||
<Compile Include="Assets\Scripts\EnnemyCharacter.cs" />
|
||||
<Compile Include="Assets\Scripts\EnemyCharacter.cs" />
|
||||
<Compile Include="Assets\Scripts\InputManager.cs" />
|
||||
<Compile Include="Assets\Scripts\Mover.cs" />
|
||||
<Compile Include="Assets\Scripts\PlayerCharacter.cs" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class EnnemyCharacter : MonoBehaviour
|
||||
public class EnemyCharacter : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
|
@ -1,10 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 42afd9ea63e8b291086605e45d3d151f
|
||||
guid: 0c9b3f253372ab4a6be34655fcf054b1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: -3
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
|
@ -29,8 +29,11 @@ public class Mover : MonoBehaviour
|
|||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (_character != null)
|
||||
{
|
||||
_maxSpeed = _character.MaxSpeed;
|
||||
}
|
||||
Vector2 currentPosition = _transform.position;
|
||||
_transform.position = currentPosition + _maxSpeed * Time.deltaTime * _direction;
|
||||
}
|
||||
|
|
|
@ -7,8 +7,6 @@ public class PlayerCharacter : AbstractCharacter
|
|||
public override void Move(Vector2 movementDirection)
|
||||
{
|
||||
// TODO : Implement limits
|
||||
Debug.Log("Direction:");
|
||||
Debug.Log(movementDirection);
|
||||
_mover.Direction = movementDirection;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue