コード例 #1
0
            public static Vector3 GetLocation(LevelscriptCommand cmd)
            {
                cmd.Position = 4;
                short x = cmd.ReadInt16();
                short y = cmd.ReadInt16();
                short z = cmd.ReadInt16();

                cmd.Position = 0;
                return(new Vector3(x, y, z));
            }
コード例 #2
0
            public static Vector3 GetPosition(LevelscriptCommand Command)
            {
                Command.Position = 6;
                var value = new Vector3();

                value.X          = Command.ReadInt16();
                value.Y          = Command.ReadInt16();
                value.Z          = Command.ReadInt16();
                Command.Position = 0;
                return(value);
            }
コード例 #3
0
            public static Vector3 GetRotation(LevelscriptCommand Command)
            {
                Command.Position = 10;
                var Rot = new Vector3();

                Rot.X            = Command.ReadInt16();
                Rot.Y            = Command.ReadInt16();
                Rot.Z            = Command.ReadInt16();
                Command.Position = 0;
                return(Rot);
            }
コード例 #4
0
            public static Vector3 GetPosition(LevelscriptCommand Command)
            {
                Command.Position = 4;
                var Pos = new Vector3();

                Pos.X            = Command.ReadInt16();
                Pos.Y            = Command.ReadInt16();
                Pos.Z            = Command.ReadInt16();
                Command.Position = 0;
                return(Pos);
            }
コード例 #5
0
            public static short GetGroupID(LevelscriptCommand Command)
            {
                Command.Position = 14;
                short id = Command.ReadInt16();

                Command.Position = 0;
                return(id);
            }
コード例 #6
0
            public static short GetScrollSpeed(LevelscriptCommand cmd)
            {
                cmd.Position = 8;
                short val = cmd.ReadInt16();

                cmd.Position = 0;
                return(val);
            }
コード例 #7
0
            public static short GetRotation(LevelscriptCommand Command)
            {
                Command.Position = 4;
                short value = Command.ReadInt16();

                Command.Position = 0;
                value            = Conversions.ToShort(value % 360);
                if (value < 0)
                {
                    value *= -1;
                }
                return(value);
            }