Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        delta += Time.deltaTime;

        if (delta > span)
        {
            delta = 0;

            count++;
        }

        if (!has_tex && count >= FIRST_TIME)
        {
            DestroyChild();
            has_tex = true;
            PrefabGenerator.CreateChild(this.gameObject, "Prefab/Event/Achoo/achoo2Prefab", "achoo2");
        }

        if (has_tex && count >= SECOND_TIME)
        {
            DestroyChild();
            Destroy(this.gameObject);
            EventDirector.curr_global_event = GlobalEvent.ETC;
        }
    }
Exemplo n.º 2
0
    void Play()
    {
        this.transform.localPosition = new Vector3(5, 3, 10);
        count             = 0;
        Calculater.speed += 999.0f;

        PrefabGenerator.CreateChild(this.gameObject, "Prefab/Event/Achoo/achooPrefab", "achoo");
    }
Exemplo n.º 3
0
 public static void CreateHimo(GameObject obj_)
 {
     if (GameObject.Find("himo"))
     {
         return;
     }
     PrefabGenerator.CreateChild(obj_, "Prefab/UI/himoPrefab", "himo");
 }
Exemplo n.º 4
0
    // Start is called before the first frame update
    void Start()
    {
        // this.transform.localPosition = new Vector3(0,8,0);

        for (int i = 0; i < gameData.MAX_OBJECT; i++)
        {
            PrefabGenerator.CreateChild(this.gameObject, "Prefab/land/objPrefab", "LandObject");
        }
    }
Exemplo n.º 5
0
    void Spown()
    {
        this.planet = GameObject.Find("en");

        const int DEGREE = 18;

        Vector3 axis = new Vector3(0, 0, 1);

        Vector3 test = new Vector3(0, 0, 0);

        for (int i = 0; i < gameData.MAX_CLOUDS; i++)
        {
            string cloud_num = "cloud" + i;


            PrefabGenerator.CreateChild(this.gameObject, "Prefab/Cloud/kumoPrefab", new Vector3(Random.Range(-1.5f, 1.5f), Random.Range(12, 15), 0), DEGREE * i, cloud_num);
        }
    }
Exemplo n.º 6
0
    // Start is called before the first frame update
    void Start()
    {
        if (!singleton)
        {
            DontDestroyOnLoad(gameObject);
            singleton = this;
        }
        else
        {
            Destroy(gameObject);
        }

        if (DataBank.GetCurrScene() == Scene.TITLE)
        {
            //PrefabGenerator.CreateChild(gameObject, "Prefab/UI/title_logoPrefab", new Vector3(0,10,0), 0, "Title_Logo");

            PrefabGenerator.CreateChild(gameObject, "Prefab/UI/sky_bgPrefab", new Vector3(0, 10, 0), 0, "sky_bg");

            PrefabGenerator.CreateChild(gameObject, "Prefab/Event/TitleEnd/TitleEndPrefab", "TitleEnd");
        }
    }
Exemplo n.º 7
0
 public static void StartTitleEnd(GameObject obj_)
 {
     PrefabGenerator.CreateChild(obj_, "Prefab/Event/TitleEndPrefab", "TitleEnd");
 }
Exemplo n.º 8
0
 public static void StartAchooEvent(GameObject obj_)
 {
     PrefabGenerator.CreateChild(obj_, "Prefab/Event/Achoo/AchooEventPrefab", "Achoo!");
     curr_global_event = GlobalEvent.ACHOO;
     can_achoo_event   = false;
 }
Exemplo n.º 9
0
    // 現在は草と土の生成のみ
    void Spown()
    {
        int[] random_arc = new int[gameData.MAX_ARC + 1];

        for (int i = 0; i < gameData.MAX_ARC + 1; i++)
        {
            random_arc[i] = Random.Range(0, (int)Attribute.GRASS_SOLID);
            random_arc[4] = random_arc[0];
        }

        for (int i = 0; i < gameData.MAX_ARC; i++)
        {
            float rotation = 90.0f * i;

            string arc_name = "base_arc" + (i + 1);

            if (random_arc[i] == (int)Attribute.GRASS)
            {
                if (random_arc[i + 1] == (int)Attribute.GRASS)
                {
                    PrefabGenerator.CreateChild(this.gameObject, "Prefab/land/grass2Prefab", this.transform.position, rotation, arc_name);
                }
                else
                {
                    PrefabGenerator.CreateChild(this.gameObject, "Prefab/land/grassPrefab", this.transform.position, rotation, arc_name);
                }
            }
            else if (random_arc[i] == (int)Attribute.SOLID)
            {
                if (random_arc[i + 1] == (int)Attribute.SOLID)
                {
                    PrefabGenerator.CreateChild(this.gameObject, "Prefab/land/solid2Prefab", this.transform.position, rotation, arc_name);
                }
                else
                {
                    PrefabGenerator.CreateChild(this.gameObject, "Prefab/land/solidPrefab", this.transform.position, rotation, arc_name);
                }
            }
            else if (random_arc[i] == (int)Attribute.GRASS_SOLID)
            {
                PrefabGenerator.CreateChild(this.gameObject, "Prefab/land/grass_solidPrefab", this.transform.position, rotation, arc_name);
            }
            else if (random_arc[i] == (int)Attribute.SOLID_GRASS)
            {
                PrefabGenerator.CreateChild(this.gameObject, "Prefab/land/solid_grassPrefab", this.transform.position, rotation, arc_name);
            }
        }

        arc_base[0] = GameObject.Find("base_arc1");
        arc_base[1] = GameObject.Find("base_arc2");
        arc_base[2] = GameObject.Find("base_arc3");
        arc_base[3] = GameObject.Find("base_arc4");

        arc_base[0].GetComponent <SpriteRenderer>().sortingOrder = 1;
        arc_base[1].GetComponent <SpriteRenderer>().sortingOrder = 2;
        arc_base[2].GetComponent <SpriteRenderer>().sortingOrder = 3;
        arc_base[3].GetComponent <SpriteRenderer>().sortingOrder = 4;


        //DataBank.bank_arc = arc_base;
    }
Exemplo n.º 10
0
 // Start is called before the first frame update
 void Start()
 {
     PrefabGenerator.CreateChild(this.gameObject, "Prefab/Event/TitleEnd/himo_dummyPrefab", "himo");
     PrefabGenerator.CreateChild(this.gameObject, "Prefab/Event/TitleEnd/player_dummyPrefab", "player_dummy");
     PrefabGenerator.CreateChild(this.gameObject, "Prefab/Event/TitleEnd/title_logoPrefab", "TitleLogo");
 }