Ejemplo n.º 1
0
        //---------------------------------------------------
        //-------------------Constructeurs-------------------
        //---------------------------------------------------
        public CoronaObject(bool isEntity)
        {
            this.isEntity = isEntity;
            this.Entity = new CoronaEntity("Entity",this);

            this.isSelected = false;
            isVisible = true;
        }
Ejemplo n.º 2
0
        //---------------------------------------------------
        //-------------------Constructeurs-------------------
        //---------------------------------------------------
        public CoronaObject(bool isEntity)
        {
            this.isEntity = isEntity;
            this.Entity   = new CoronaEntity("Entity", this);

            this.isSelected = false;
            isVisible       = true;
        }
Ejemplo n.º 3
0
        public CoronaEntity cloneEntity(CoronaObject objectParent)
        {
            string newName = objectParent.LayerParent.SceneParent.projectParent.IncrementObjectName(this.Name);

            CoronaEntity newEntity = new CoronaEntity(newName, objectParent);

            objectParent.Entity = newEntity;
            ////Copier toutes les objets
            for (int i = 0; i < this.CoronaObjects.Count; i++)
            {
                CoronaObject obj = this.CoronaObjects[i].cloneObject(this.CoronaObjects[i].LayerParent, true, true);

                newEntity.addObject(obj);
            }

            //Recreer toutes les jointures
            for (int i = 0; i < this.Jointures.Count; i++)
            {
                CoronaJointure currentJoint = this.Jointures[i];

                int indexOfOBJA = -1;
                int indexOfOBJB = -1;

                if (currentJoint.coronaObjA != null)
                {
                    indexOfOBJA = this.CoronaObjects.IndexOf(currentJoint.coronaObjA);
                }

                if (currentJoint.coronaObjB != null)
                {
                    indexOfOBJB = this.CoronaObjects.IndexOf(currentJoint.coronaObjB);
                }

                CoronaObject newOBJA = null;
                CoronaObject newOBJB = null;

                if (indexOfOBJA > -1)
                {
                    newOBJA = newEntity.CoronaObjects[indexOfOBJA];
                }

                if (indexOfOBJB > -1)
                {
                    newOBJB = newEntity.CoronaObjects[indexOfOBJB];
                }

                CoronaJointure newJoint = currentJoint.clone(newOBJA, newOBJB, currentJoint.layerParent);
                newEntity.Jointures.Add(newJoint);
            }


            return(newEntity);
        }
Ejemplo n.º 4
0
        public CoronaEntity cloneEntity(CoronaObject objectParent)
        {
            string newName = objectParent.LayerParent.SceneParent.projectParent.IncrementObjectName(this.Name);

            CoronaEntity newEntity = new CoronaEntity(newName,objectParent);
            objectParent.Entity = newEntity;
            ////Copier toutes les objets
            for (int i = 0; i < this.CoronaObjects.Count; i++)
            {
                CoronaObject obj = this.CoronaObjects[i].cloneObject(this.CoronaObjects[i].LayerParent,true,true);

                newEntity.addObject(obj);
            }

            //Recreer toutes les jointures
            for (int i = 0; i < this.Jointures.Count; i++)
            {
                CoronaJointure currentJoint = this.Jointures[i];

                int indexOfOBJA = -1;
                int indexOfOBJB = -1;

                if(currentJoint.coronaObjA != null)
                    indexOfOBJA = this.CoronaObjects.IndexOf(currentJoint.coronaObjA);

                if(currentJoint.coronaObjB != null)
                    indexOfOBJB = this.CoronaObjects.IndexOf(currentJoint.coronaObjB);

                CoronaObject newOBJA = null;
                CoronaObject newOBJB = null;

                if(indexOfOBJA>-1)
                    newOBJA = newEntity.CoronaObjects[indexOfOBJA];

                if(indexOfOBJB>-1)
                    newOBJB = newEntity.CoronaObjects[indexOfOBJB];

                CoronaJointure newJoint = currentJoint.clone(newOBJA, newOBJB, currentJoint.layerParent);
                newEntity.Jointures.Add(newJoint);

            }

            return newEntity;
        }
Ejemplo n.º 5
0
 //---------------------------------------------------
 //-------------------Methodes------------------------
 //---------------------------------------------------
 public void setEntityParent(CoronaEntity entity)
 {
     this.EntityParent = entity;
 }
Ejemplo n.º 6
0
        //---------------------------------------------------
        //-------------------Methodes------------------------
        //---------------------------------------------------

        public void setEntityParent(CoronaEntity entity)
        {
            this.EntityParent = entity;
        }