Ejemplo n.º 1
0
        protected override IEnumerator Load()
        {
            var waitForCount = new WaitForCount();

            System.Action pre  = waitForCount.inc;
            System.Action done = waitForCount.dec;

            var rm = ResourceSystem.Instance;

            rm.Load <GameObject>("Title.Logo.prefab", pre, done, (res) => { this.logoPrefab = res; });
            rm.Load <GameObject>("Title.MenuCpu.prefab", pre, done, (res) => { this.menuPrefabs.Add(res); });
            rm.Load <GameObject>("Title.MenuVs.prefab", pre, done, (res) => { this.menuPrefabs.Add(res); });
            rm.Load <GameObject>("Title.MenuDemo.prefab", pre, done, (res) => { this.menuPrefabs.Add(res); });
            rm.Load <GameObject>("Title.MenuOption.prefab", pre, done, (res) => { this.menuPrefabs.Add(res); });
            rm.Load <GameObject>("Title.EffectGenerator.prefab", pre, done, (res) => { this.effectPrefab = res; });
            rm.Load <GameObject>("Cursor.CatPaw.prefab", pre, done, (res) => { this.cursorPrefab = res; });
            rm.Load <AudioClip>("BGM.001", pre, done);
            rm.Load <AudioClip>("SE.Select01", pre, done);
            TitleLogo.Load(pre, done);
            Menu.Load(pre, done);
            Paw.Load(pre, done);
            EffectGenerator.Load(pre, done);

            yield return(waitForCount);

            this.isLoaded = true;
            this.state.SetState(State.Setup);
        }
Ejemplo n.º 2
0
        //-------------------------------------------------------------------------
        // ステートマシン

        /// <summary>
        /// リソースからゲームオブジェクトを生成する
        /// </summary>
        private void OnSetupEnter()
        {
            // タイトルロゴ
            this.logo = Instantiate(this.logoPrefab).GetComponent <TitleLogo>();
            this.logo.SetParent(this.CacheTransform);
            this.logo.SetActive(false);

            // カーソル
            this.cursor = Instantiate(this.cursorPrefab).GetComponent <Paw>();
            this.cursor.SetParent(this.CacheTransform);
            this.cursor.SetActive(false);
            this.cursor.PadNo = 0;

            // メニュー
            this.menuPrefabs.ForEach((prefab) => {
                var menu = Instantiate(prefab).GetComponent <Menu>();
                menu.SetParent(this.CacheTransform);
                menu.SetActive(false);
                menu.SceneType = SceneSystem.SceneType.Title;
                this.menus.Add(menu);
            });

            // エフェクト
            this.effect = Instantiate(this.effectPrefab).GetComponent <EffectGenerator>();
            this.effect.SetParent(this.CacheTransform);

            // Introへ
            this.state.SetState(State.Intro);
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Dog dog = new Dog();

            Paw paw = dog.GetPaw();

            paw.Clean();

            Console.WriteLine(paw.IsClean());
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            Dog dog = new Dog("DogName", 2);

            Paw paw = dog.GetPaw();

            Console.WriteLine(paw.IsClean());

            Paw newPaw = dog.GetNewPaw();

            newPaw.Clean();
            Console.WriteLine(newPaw.IsClean());
        }
Ejemplo n.º 5
0
        protected override void OnMyDestory()
        {
            SoundSystem.Instance.StopBGM();
            var rm = ResourceSystem.Instance;

            rm.Unload("Title.Logo.prefab");
            rm.Unload("Title.MenuCpu.prefab");
            rm.Unload("Title.MenuVs.prefab");
            rm.Unload("Title.MenuDemo.prefab");
            rm.Unload("Title.MenuOption.prefab");
            rm.Unload("Title.EffectGenerator.prefab");
            rm.Unload("Cursor.CatPaw.prefab");
            rm.Unload("BGM.001");
            rm.Unload("SE.Select01");

            TitleLogo.Unload();
            Menu.Unload();
            Paw.Unload();
            EffectGenerator.Unload();
        }
Ejemplo n.º 6
0
 public Dog(string _name, int _age)
 {
     paw  = new Paw();
     name = _name;
     age  = _age;
 }