Beispiel #1
0
            /********************
             * Movement factory
             * ***************/
            public static Movement createMovement(MovementType type, Entity entity, Mover mover,
                                                  Vector3 from, Vector3 to, Cell origin, Cell destination, Dictionary <string, object> mParams)
            {
                Movement movement = null;

                switch (type)
                {
                case MovementType.Lineal: movement = new LinealMovement(); break;

                case MovementType.Parabolic: movement = new ParabolicMovement(); break;

                case MovementType.Instant: movement = new InstantMovement(); break;

                case MovementType.Turn: movement = new TurnMovement(); break;

                case MovementType.Fade: movement = new FadeMovement(); break;

                default: movement = new LinealMovement(); break;
                }

                movement.setParams(mParams);

                movement.origin      = origin;
                movement.destination = destination;

                movement.from   = from;
                movement.to     = to;
                movement.entity = entity;
                movement.mover  = mover;

                return(movement);
            }
Beispiel #2
0
        /********************
         * Movement factory
         * ***************/
        public static Movement createMovement(MovementType type, Entity entity, Mover mover, Decoration dec, IsoDecoration sheet, 
            Vector3 from, Vector3 to, Cell origin, Cell destination, Dictionary<string, object> mParams)
        {
            Movement movement = null;

            switch(type){
            case MovementType.Lineal: movement = new LinealMovement(); break;
            case MovementType.Parabolic: movement = new ParabolicMovement(); break;
            case MovementType.Instant: movement = new InstantMovement(); break;
            case MovementType.Turn: movement = new TurnMovement(); break;
            default: movement = new LinealMovement(); break;
            }

            movement.setParams(mParams);

            movement.origin = origin;
            movement.destination = destination;

            movement.from = from;
            movement.to = to;
            movement.entity = entity;
            movement.dec = dec;
            movement.sheet = sheet;
            movement.mover = mover;

            return movement;
        }