Пример #1
0
    void CreateBulletEntityGo(string id)
    {
        MoveActionRenderer renders = Bullet.ObjectPool.GetGameObject().GetComponent <MoveActionRenderer>();

        renders.SetEntityId(id);
        renders.transform.SetParent(transform);
        renders.transform.localPosition = Vector3.zero;
        renders.transform.localScale    = Vector3.one;
    }
Пример #2
0
    void CreateNewEntityGO(string id)
    {
        GameObject         obj              = GameObject.Instantiate(Resources.Load("EntityObj") as GameObject);
        MoveActionRenderer renderers        = obj.AddComponent <MoveActionRenderer>();
        PlayerInfoDisplayActionRenderer red = obj.GetComponent <PlayerInfoDisplayActionRenderer>();

        red.SetEntityId(id);
        renderers.SetEntityId(id);
        obj.transform.SetParent(transform);
        obj.transform.localPosition = new Vector3(0, 0, 0);
        obj.transform.localScale    = new Vector3(1, 1, 1);
        DictGameObject[id]          = renderers.gameObject;
    }
Пример #3
0
    void CreateBulletEntityGo(string id)
    {
        GameObject obj = Bullet.ObjectPool.GetGameObject();
        FrameClockActionRenderer fRender = obj.AddComponent <FrameClockActionRenderer>();

        fRender.SetEntityId(id);
        MoveActionRenderer renderers = obj.GetComponent <MoveActionRenderer>();

        renderers.SetEntityId(id);
        renderers.transform.SetParent(transform);
        renderers.transform.localPosition = Vector3.zero;
        renderers.transform.localScale    = Vector3.one;

        DictGameObject[id] = renderers.gameObject;
    }