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(); } }
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"); }
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"); }
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 Walk(ClassEnemy classEnemy, Vector2 directions) { BehaviourPhysics.Move(classEnemy.gameObject, directions, classEnemy.speed); }