Ejemplo n.º 1
0
        public void Awake()
        {
            m_animator = base.gameObject.GetComponent <Animator>();
            mg_if_Variables variables = MinigameManager.GetActive <mg_IceFishing>().Resources.Variables;

            m_blinkMin = variables.BlinkTimeMin;
            m_blinkMax = variables.BlinkTimeMax;
            OnAnimationFinished();
        }
Ejemplo n.º 2
0
        private void LoadGameVariables()
        {
            TextAsset   textAsset   = Resources.Load("IceFishing/mg_if_Variables") as TextAsset;
            XmlDocument xmlDocument = new XmlDocument();

            xmlDocument.LoadXml(textAsset.text);
            m_variables = new mg_if_Variables();
            Type    type    = m_variables.GetType();
            XmlNode xmlNode = xmlDocument.SelectSingleNode("/variables");

            foreach (XmlElement item in xmlNode.ChildNodes.OfType <XmlElement>())
            {
                PropertyInfo property = type.GetProperty(item.Name);
                property?.SetValue(m_variables, Convert.ChangeType(item.InnerText, property.PropertyType, CultureInfo.InvariantCulture), null);
            }
        }
Ejemplo n.º 3
0
        public void Awake()
        {
            m_variables   = MinigameManager.GetActive <mg_IceFishing>().Resources.Variables;
            TopZone       = base.transform.Find("mg_if_ZoneTop");
            BottomZone    = base.transform.Find("mg_if_ZoneBottom");
            AlphaLeft     = base.transform.Find("mg_if_AlphaLeft");
            AlphaRight    = base.transform.Find("mg_if_AlphaRight");
            CrabStopLeft  = base.transform.Find("mg_if_CrabStop_Left").gameObject;
            CrabStopRight = base.transform.Find("mg_if_CrabStop_Right").gameObject;
            GameObject gameObject = base.transform.Find("mg_if_GameBG").gameObject;
            Vector3    localScale = gameObject.transform.localScale;

            MinigameSpriteHelper.FitSpriteToScreen(MinigameManager.GetActive <mg_IceFishing>().MainCamera, gameObject, _preserveAspect: false);
            base.transform.localScale       = gameObject.transform.localScale;
            gameObject.transform.localScale = localScale;
            mouseInputObserver = base.gameObject.AddComponent <MouseInputObserver>();
        }
Ejemplo n.º 4
0
 public void UnloadGameResources()
 {
     m_variables = null;
     UnloadResource(mg_if_EResourceList.GAME_LOGIC);
     UnloadResource(mg_if_EResourceList.GAME_PUFFLE);
     UnloadResource(mg_if_EResourceList.GAME_YELLOWFISH);
     UnloadResource(mg_if_EResourceList.GAME_BARREL);
     UnloadResource(mg_if_EResourceList.GAME_BOOT);
     UnloadResource(mg_if_EResourceList.GAME_JELLYFISH);
     UnloadResource(mg_if_EResourceList.GAME_SHARK_NEAR);
     UnloadResource(mg_if_EResourceList.GAME_SHARK_FAR);
     UnloadResource(mg_if_EResourceList.GAME_CRAB);
     UnloadResource(mg_if_EResourceList.GAME_FREE_LIFE);
     UnloadResource(mg_if_EResourceList.GAME_SOUNDS);
     UnloadResource(mg_if_EResourceList.GAME_SOUNDS_SINGLE);
     UnloadGameSounds();
     m_hasLoadedGame = false;
 }
Ejemplo n.º 5
0
 protected virtual void Awake()
 {
     m_variables = MinigameManager.GetActive <mg_IceFishing>().Resources.Variables;
     m_renderers = GetComponentsInChildren <SpriteRenderer>();
 }