예제 #1
0
        internal ulong CreateActor(EActor eActor)
        {
            Actor act = null;

            switch (eActor)
            {
            case EActor.Rect:
                act = new RectActor(++id);
                break;

            case EActor.Ellipse:
                act = new EllipseActor(++id);
                break;

            case EActor.Image:
                act = new ImageActor(++id);
                break;

            case EActor.Media:
                act = new MediaActor(++id);
                break;

            case EActor.Font:
                act = new FontActor(++id);
                break;

            default:
                break;
            }
            OCActor.Add(act);
            NotifyPropertyChanged(StrOCActor);
            return(id);
        }
 public FiltroDeSeguimiento(EAcceso objEntidadAccesoRecibido)
 {
     InitializeComponent();
     objEntidadProblematica = new EProblematica();
     objEntidadActor        = new EActor();
     this.objEntidadAcceso  = objEntidadAccesoRecibido;
 }
예제 #3
0
        private ulong CreateActor(EActor eActor)
        {
            ulong id = StageMgr.Instance.CreateActor(eActor);

            lstHierarchy.SelectedIndex = StageMgr.Instance.OCActor.Count - 1;
            return(id);
        }
예제 #4
0
 public DActor(EActor ObjEActorRecibido) // aqui decimos que la clase DActor siempre va a recibir datos de EActor por
 {                                       //medio de la variable de objEactorRecibido
     this.ObjEActor = ObjEActorRecibido;
 }
예제 #5
0
 public void SetActor(EActor target)
 {
     _actor = target;
 }
예제 #6
0
        public override void ApplicationStart()
        {
            // Add texture
            ETexture t = new ETexture("test");

            t.Load(EEngine.BuildIn + "Test.png");

            EMaterial eMaterial = new ELambertMat();

            eMaterial.ModifyTex("DiffuseTextureVaild", t);

            // Add camera
            EActor obj = new EActor("cam");

            obj.position = new Vector3(0, 0, 0);
            obj.AddComponent <EFreeCamera>();
            EEngine.CurrentScene.AddActorToScene(obj);

            // Add render stuff
            obj          = new EActor("Obj 01");
            obj.position = new Vector3(0, 0, -10);
            obj.scale    = new Vector3(1f, 1f, 1f);

            EMeshFilter meshf = obj.AddComponent <EMeshFilter>();

            meshf.SetMesh(EPrimitiveMesh.GetPrimitiveMesh(EPrimitiveMesh.PrimitiveType.Cube));

            EMeshRenderer meshr = obj.AddComponent <EMeshRenderer>();

            meshr.SetMaterial(eMaterial);
            EEngine.CurrentScene.AddActorToScene(obj);

            // Add render stuff 02
            obj          = new EActor("Obj 02");
            obj.position = new Vector3(5, 0, -10);
            obj.scale    = new Vector3(1f, 1f, 1f);

            meshf = obj.AddComponent <EMeshFilter>();
            meshf.SetMesh(EPrimitiveMesh.GetPrimitiveMesh(EPrimitiveMesh.PrimitiveType.Cube));

            meshr = obj.AddComponent <EMeshRenderer>();
            meshr.SetMaterial(eMaterial);
            EEngine.CurrentScene.AddActorToScene(obj);

            // Add render stuff 04
            obj          = new EActor("Obj 04");
            obj.position = new Vector3(1, 0, -2);
            obj.scale    = new Vector3(1f, 1f, 1f);

            meshf = obj.AddComponent <EMeshFilter>();
            meshf.SetMesh(EPrimitiveMesh.GetPrimitiveMesh(EPrimitiveMesh.PrimitiveType.Sphere));

            meshr = obj.AddComponent <EMeshRenderer>();
            meshr.SetMaterial(eMaterial);
            EEngine.CurrentScene.AddActorToScene(obj);

            // Add direction light

            obj        = new EActor("Dir light");
            obj.rotate = Quaternion.FromEulerAngles(new Vector3(-40, 125, 0));
            EDirectionLight dlight = obj.AddComponent <EDirectionLight>();

            dlight.color     = new Color4(1.0f, 1.0f, 0.8f, 1.0f);
            dlight.intensity = 0.9f;
            EEngine.CurrentScene.AddActorToScene(obj);

            // Add point light
            obj          = new EActor("Point light");
            obj.position = new Vector3(2, 3, -5);
            EPointLight plight = obj.AddComponent <EPointLight>();

            plight.color = Color4.Red;
            EEngine.CurrentScene.AddActorToScene(obj);

            // Add point light
            obj          = new EActor("Point light");
            obj.position = new Vector3(-2, 3, -5);
            plight       = obj.AddComponent <EPointLight>();
            plight.color = Color4.White;
            EEngine.CurrentScene.AddActorToScene(obj);
        }
 public static bool CurrentActorIs(this IActorProvider provider, EActor actor)
 {
     return(provider.CurrentActor == actor);
 }