Exemple #1
0
        private void reset()
        {
            Vector3 eulerAngles = base.transform.rotation.eulerAngles;

            eulerAngles.z           = 0f;
            base.transform.rotation = Quaternion.Euler(eulerAngles);
            FishState = mg_if_EFishState.STATE_SWIMMING;
            m_hook    = null;
        }
Exemple #2
0
        public void OnHooked(mg_if_FishingHook p_hook)
        {
            MinigameManager.GetActive().PlaySFX("mg_if_sfx_CatchFish");
            FishState = mg_if_EFishState.STATE_HOOKED;
            m_hook    = p_hook;
            Vector3 eulerAngles = base.transform.rotation.eulerAngles;

            eulerAngles.z           = 90f * base.transform.localScale.x;
            base.transform.rotation = Quaternion.Euler(eulerAngles);
            UpdateHooked();
        }
Exemple #3
0
 public void Start()
 {
     m_logic         = MinigameManager.GetActive <mg_IceFishing>().Logic;
     m_hook          = GetComponentInChildren <mg_if_FishingHook>();
     m_line          = GetComponentInChildren <mg_if_FishingLine>();
     m_penguin       = GetComponentInChildren <mg_if_Penguin>();
     m_wormCan       = GetComponentInChildren <mg_if_WormCan>();
     m_mainCamera    = MinigameManager.GetActive <mg_IceFishing>().MainCamera;
     m_destination   = new Vector2(0f, -4f);
     m_touchDistance = m_hook.GetComponentInChildren <BoxCollider2D>().size.y * 1.5f;
     m_hook.Initialize(this, GetComponentInChildren <mg_if_WormDrop>());
     m_line.Initialize(this);
     m_penguin.Initialize(this);
     m_wormCan.UpdateWorms(m_logic.Lives);
 }