-
Notifications
You must be signed in to change notification settings - Fork 3
/
Enemy1Manager.cs
42 lines (37 loc) · 1.17 KB
/
Enemy1Manager.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Enemy1Manager : EnemyManager {
private float h_Input;
Enemy1Movement movement;
protected override void Animate()
{
h_Input = Input.GetAxis("Horizontal");
base.Animate();
bool isMoving = h_Input != 0f;
SetAnim("walking", isMoving);
SetAnim("moving", isMoving);
//sr.flipX = enemyMovement.Displacement.x > 0f ? (spriteLeftByDefault ? true : false) : (spriteLeftByDefault ? false : true);
//sr.flipX = h_Input != 0f ? (h_Input > 0f ? false : true) : sr.flipX;
sr.flipX = h_Input != 0f ? (h_Input > 0f ? false : true) : (h_Input > 0f ? true : false);
/*
if (Input.GetKeyDown(KeyCode.UpArrow) && movement.remainingJumps > 0)
{
SetAnim("grounded", false);
if (movement.isGrounded)
{
TriggerAnim("jump");
}
else
{
TriggerAnim("air_jump");
}
}
*/
}
/*
private bool isGrounded {
return movement.isGrounded;
}
*/
}