Ejemplo n.º 1
0
    //public override void CheckHideText(Transform transformRightToCheckAround, Transform transformLeftToCheckAround)
    //{
    //    if(Player.instance.GetStateLocation() is PlayerInBoat &&  !(Player.instance.GetStateAction() is PlayerExplore))
    //    {
    //        if (Physics2DUtils.GetColliderAround(transformRightToCheckAround, 5, "Ground") == null || Physics2DUtils.GetColliderAround(transformLeftToCheckAround, 5, "Ground") == null)
    //        {
    //            showInteractObject.SetActive(false);
    //        }
    //    }
    //    else if (!(Player.instance.GetStateAction() is PlayerExplore))
    //    {
    //        if (Physics2DUtils.GetColliderAround(transformRightToCheckAround, 5, "Player") == null || Physics2DUtils.GetColliderAround(transformLeftToCheckAround, 5, "Player") == null)
    //        {
    //            showInteractObject.SetActive(false);
    //        }
    //    }
    //}

    public override bool ConditionShowText()
    {
        if (Player.instance.GetStateAction() is PlayerExplore &&
            ((Player.instance.GetStateLocation() is PlayerInBoat && Physics2DUtils.CheckIfColliderAround(transform, 5, "Ground")) || Player.instance.GetStateLocation() is PlayerOnGround))
        {
            return(true);
        }
        return(false);
    }
Ejemplo n.º 2
0
 public override void Update()
 {
     if (Physics2DUtils.CheckIfColliderAround(player.transform, 2, "Decoy") && canCheckDecoyAround)
     {
         Physics2DUtils.GetColliderAround(player.transform, 3, "Decoy").GetComponent <FishingRode>().GetBackFish();
         player.animator.SetBool("Fishing", false);
         player.animator.SetBool("ThrowFishingRode", false);
     }
 }
Ejemplo n.º 3
0
 public override void DoInteraction()
 {
     if (Player.instance.GetStateLocation() is PlayerInBoat && Physics2DUtils.CheckIfColliderAround(transform, 5, "Ground"))
     {
         Player.instance.GoOutOfBoat(Physics2DUtils.GetColliderAround(transform, 5, "Ground").GetComponent <Ground>());
     }
     else
     {
         Player.instance.GoInBoat();
     }
 }
Ejemplo n.º 4
0
 public override void PressForFishing()
 {
     if (Physics2DUtils.CheckIfColliderAround(player.transform, 3, "Water"))
     {
         StartFishing();
         player.animator.SetBool("ThrowFishingRode", true);
     }
     else
     {
         Debug.Log("Vous êtes trop loin de l'eau");
     }
 }