예제 #1
0
 private bool IsAwoiding(PlatformCharacter2D player)
 {
     if (m_isCrate)
     {
         return(player.IsJumping());
     }
     else
     {
         return(player.IsSliding());
     }
 }
예제 #2
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        PlatformCharacter2D player = collision.gameObject.GetComponent <PlatformCharacter2D>();

        if (player && isworking)
        {
            if (!IsAwoiding(player))
            {
                isworking = false;
                StartCoroutine(player.Fail());
            }
            else
            {
                player.Yay();
            }
        }
    }
예제 #3
0
 private void Awake()
 {
     m_Character = GetComponent <PlatformCharacter2D>();
 }