Example #1
0
    // Update is called once per frame
    void Update()
    {
        // タイトルシーンでの処理
        if (DataBank.GetCurrScene() == Scene.TITLE)
        {
            UtillityMethod.PlanetRotate(this.gameObject, -gameData.MAP_SPEED * Time.deltaTime);
        }
        // ゲームシーンでの処理
        else
        {
            UtillityMethod.PlanetRotate(this.gameObject, gameData.speed);

            if (UtillityMethod.GetMessage(Message.RESPOWN))
            {
                transform.position = new Vector3(0, 10, -10);
                transform.rotation = new Quaternion(0, 0, 0, 0);
            }

            himoController.CreateHimo(gameObject);

            DestroyChild("TitleEnd");

            // イベント処理(くしゃみ)
            if (EventDirector.can_achoo_event)
            {
                EventDirector.StartAchooEvent(gameObject);
            }
        }
    }
Example #2
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");
        }
    }
Example #3
0
    // Update is called once per frame
    void Update()
    {
        if (DataBank.GetCurrScene() == Scene.TITLE)
        {
            return;
        }


        if (Input.GetMouseButtonDown(0))
        {
            Ray          ray   = Camera.main.ScreenPointToRay(Input.mousePosition);
            RaycastHit2D hit2d = Physics2D.Raycast((Vector2)ray.origin, (Vector2)ray.direction);

            if (hit2d)
            {
                if (hit2d.collider.gameObject.CompareTag("himo"))
                {
                    EventDirector.StartPlanetInitEvent();
                }
            }
        }
    }