Exemplo n.º 1
0
    public void Init(SceneObject so)
    {
        this.SceneObject = so;
        var comps = SceneObject.GetAllComponents();

        for (int i = 0; i < comps.Count; i++)
        {
            AddComponent(comps[i]);
        }
        so.ListenEvent((int)SceneObject.SceneObjectEvent.OnAddComponent, OnSceneObjectAddComponent);
        so.ListenEvent((int)SceneObject.SceneObjectEvent.OnRemoveComponent, OnSceneObjectRemoveComponent);
        so.ListenEvent((int)SceneObject.SceneObjectEvent.Executedisplayaction, PlayDisplayAction);
        so.ListenEvent((int)SceneObject.SceneObjectEvent.Stopdisplayaction, StopDisplayAction);
    }