public static void Walk(ClassHero classHero, Vector2 directions) { BehaviourPhysics.Move(classHero.gameObject, directions, classHero.speed); BehaviourAnimation.Flip(classHero.gameObject, directions); BehaviourAnimation.Play(classHero.gameObject, "Walk"); }
void Update() { if (hp.fillAmount <= 0) { Dictionary <string, object> d = new Dictionary <string, object>(); d.Add("Check Point", "Lies - Tutorial"); GameManagerGeneric.Instance.SaveInfo(d); SceneManager.LoadScene("Game Over"); } if (blocks.transform.position.y < -100) { BehaviourPhysics.Move(blocks, Vector2.up, 0); Vector3 pos = blocks.transform.position; pos.y = -100; blocks.transform.position = pos; } else if (blocks.transform.position.y > 100) { BehaviourPhysics.Move(blocks, Vector2.up, 0); Vector3 pos = blocks.transform.position; pos.y = 100; blocks.transform.position = pos; } if (endChapter && music.time >= 100) { NextScene(); } }
private void Spin(Vector2 direction) { direction.x += direction.y; direction.y = direction.x - direction.y; direction.x = direction.x - direction.x; BehaviourPhysics.AddTorque(cubeClass.gameObject, direction, cubeClass.forceJump); }
public static void Jump(ClassHero classHero) { BehaviourPhysics.Force(classHero.gameObject, Vector2.up, classHero.forceJump); AudioClip audio = classHero.sfx[0]; BehaviourSound.Play(classHero.gameObject, audio); }
public void Jump() { if (CanJump()) { SoundManager.Instance.Play("SFX/Jump"); BehaviourPhysics.Force(gameObject, Vector3.up, forceJump); onFloor = false; } }
public static void Attack(ClassHero classHero) { //BehaviourPhysics.Force(classHero.gameObject, Vector2.right * classHero.faceRight, classHero.forceAttack); BehaviourPhysics.Move(classHero.gameObject, Vector2.right * classHero.faceRight, classHero.forceAttack); BehaviourAnimation.Play(classHero.gameObject, "Attack"); if (!classHero.isAttack) { AudioClip audio = classHero.sfx[2]; BehaviourSound.Play(classHero.gameObject, audio); } }
public static void Idle(ClassHero classHero) { BehaviourPhysics.Move(classHero.gameObject, Vector2.right, 0); BehaviourAnimation.Play(classHero.gameObject, "Idle"); }
public static void Walk(ClassTrashCan dataTrashCan, int direction) { BehaviourPhysics.Turn(dataTrashCan.transform.parent.gameObject, Vector3.forward * direction, dataTrashCan.moveSpeed); //BehaviourAnimation.Play(dataTrashCan.gameObject, "Walk"); //BehaviourSound.Play("Walk"); }
private void MoveArrows(float velocity) { velocity *= Random.Range(130f, 150f); BehaviourPhysics.Move(arrows, Vector2.up, velocity); }
private void MoveBlocks(float velocity) { velocity *= Random.Range(50f, 60f); BehaviourPhysics.Move(blocks, Vector2.up, velocity); }
private void CreateItem() { var item = spawer.Spawn(); BehaviourPhysics.Move(item, Vector3.back, speed); }
public static void Move(ClassKokoro classKokoro, Vector2 directions) { BehaviourPhysics.Move(classKokoro.gameObject, directions, classKokoro.speed); }
public static void Idle(ClassGeneric classKokoro, Vector2 directions) { BehaviourPhysics.Move(classKokoro.gameObject, directions, 0); }
public static void Idle(ClassEnemy classEnemy) { BehaviourPhysics.Move(classEnemy.gameObject, Vector2.right, 0); }
public static void Spin(ClassEnemy classEnemy) { BehaviourPhysics.Torque(classEnemy.gameObject, classEnemy.speed); }
public static void Walk(ClassEnemy classEnemy, Vector2 directions) { BehaviourPhysics.Move(classEnemy.gameObject, directions, classEnemy.speed); }