Esempio n. 1
0
    public void     createMissEffect(NekoControl neko)
    {
        GameObject go = Instantiate(this.eff_miss) as GameObject;

        go.AddComponent <Effect>();

        Vector3 position = neko.transform.position;

        position.y += 0.3f;

        // 防止陷入铁板中
        position.z -= 0.2f;

        go.transform.position = position;
    }
Esempio n. 2
0
    // ================================================================ //

    // 和纸碰撞时的特效
    public void     createBreakEffect(SyoujiPaperControl paper, NekoControl neko)
    {
        GameObject go = Instantiate(this.eff_break) as GameObject;

        go.AddComponent <Effect>();

        Vector3 position = paper.transform.position;

        position.x = neko.transform.position.x;
        position.y = neko.transform.position.y;

        position.y += 0.3f;

        go.transform.position = position;

        // 为了一直显示在屏幕上,设置为摄像机的子结点(可以和摄像机一起移动)
        go.transform.parent = this.game_camera.transform;
    }
Esempio n. 3
0
    // ================================================================ //

    // 紙をやぶったときのエフェクト.
    public void     createBreakEffect(SyoujiPaperControl paper, NekoControl neko)
    {
        GameObject go = Instantiate(this.eff_break) as GameObject;

        go.AddComponent <Effect>();

        Vector3 position = paper.transform.position;

        position.x = neko.transform.position.x;
        position.y = neko.transform.position.y;

        position.y += 0.3f;

        go.transform.position = position;

        // 画面に長く映るよう、カメラの子供にする(カメラと一緒に移動するように).
        go.transform.parent = this.game_camera.transform;
    }
Esempio n. 4
0
    // ================================================================ //
    // 继承于MonoBehaviour

    void    Awake()
    {
        this.neko_control = GameObject.FindGameObjectWithTag("NekoPlayer").GetComponent <NekoControl>();

        this.room_control = RoomControl.get();
    }