Example #1
0
 public static void DeathAfterDeadLine()
 {
     MessageSystemPlayingScene.GeneralyPartOfDeath();
     MessageSystemPlayingScene.AutoSelectNextCharacter();
     MessageSystemGameBlock.StartGame();
     MessageSystemPlayingScene.InBodyColider = false;
 }
Example #2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.CompareTag("Player") && !isDeadLine)
     {
         isDeadLine = true;
         MessageSystemPlayingScene.GeneralyPartOfDeath();
         MessageSystemPlayingScene.AutoSelectNextCharacter();
         MessageSystemGameBlock.StartGame();
         MessageSystemPlayingScene.InBodyColider = false;
     }
 }
Example #3
0
 public void NextCharacter()
 {
     MessageSystemPlayingScene.AutoSelectNextCharacter();
     MessageSystemGameBlock.StartGame();
 }
    public static void SelectHero(GameObject hero)
    {
        foreach (GameObject obj in circle)
        {
            if (obj.name == hero.name)
            {
                obj.GetComponent <Animation>().Play("RizeCircle");
            }
            else if (playerName == obj.name)
            {
                obj.GetComponent <Animation>().Play("ReduceCircle");
                if (IsActiveColider(playerName))
                {
                    obj.GetComponentInChildren <BoxCollider2D>().enabled = true;
                }
                else
                {
                    ChangeToCrossSprite(obj);
                }
            }
            else
            {
                if (IsActiveColider(obj.name))
                {
                    obj.GetComponentInChildren <BoxCollider2D>().enabled = true;
                }
            }
        }
        playerName = hero.name;
        player.SetActive(false);
        Vector2 positionLastPlayer = player.transform.position;
        string  nameLastPlayer     = player.name;

        if (!isStart)
        {
            storageVoid[0, (int)hash[playerName]]();
        }
        else
        {
            ChangeHeroAfterStart();
        }
        if (IsStart && IsActiveColider(nameLastPlayer))
        {
            player.transform.position = positionLastPlayer;
        }
        if (player.transform.position.x >= 0)
        {
            PlayerZone.IsOutside = false;
            PlayerZone.SetNoneRigid();
        }
        if (PlayerZone.IsOutside && !isDead)
        {
            PlayerZone.MoveToPlayerZone();
        }
        if (isJump && !isDead)
        {
            MessageSystemGameBlock.SetPlayingConstraints();
        }
        if (!animationDeathIsFinished)
        {
            MessageSystemGameBlock.StartGame();
            isDead = false;
            EnableCollider();
        }
        DeadLine.IsDeadLine = false;
        player.SetActive(true);
    }