Ejemplo n.º 1
0
        internal void SetupMount(Mount.MountData mountData)
        {
            ModMount newMountData = (ModMount)MemberwiseClone();

            newMountData.MountData = mountData;
            mountData.ModMount     = newMountData;
            newMountData.Mod       = Mod;
            newMountData.SetDefaults();
        }
Ejemplo n.º 2
0
        public int MountType(string name)
        {
            ModMount mount = GetMount(name);

            if (mount == null)
            {
                return(0);
            }
            return(mount.mount.Type);
        }
Ejemplo n.º 3
0
        public void AddMount(string name, ModMount mount, string texture)
        {
            int id = MountLoader.ReserveMountID();

            mount.mount.Reset();
            mounts[name]           = mount;
            MountLoader.Mounts[id] = mount;
            mount.texture          = texture;
            mount.mod = this;
        }
Ejemplo n.º 4
0
        private void AutoloadMount(Type type)
        {
            ModMount mount = (ModMount)Activator.CreateInstance(type);

            mount.mod = this;
            string name    = type.Name;
            string texture = (type.Namespace + "." + type.Name).Replace('.', '/');

            if (mount.Autoload(ref name, ref texture))
            {
                AddMount(name, mount, texture);
            }
        }
Ejemplo n.º 5
0
        internal void SetupModMount(Mount mount)
        {
            ModMount newMount = (ModMount)Activator.CreateInstance(GetType());

            newMount.mount = mount;
            mount.modMount = newMount;
            newMount.mod   = mod;
            newMount.mount.setMountData(index, spawnDust, heightBoost, runSpeed, dashSpeed, acceleration, jumpHeight,
                                        jumpSpeed, bodyFrame, xOffset, yOffset, playerHeadOffset, standingFrameCount, standingFrameDelay,
                                        standingFrameStart, runningFrameCount, runningFrameDelay, runningFrameStart, flyingFrameCount,
                                        flyingFrameDelay, flyingFrameStart, inAirFrameCount, inAirFrameDelay, inAirFrameStart, idleFrameCount,
                                        idleFrameDelay, idleFrameStart, swimFrameCount, swimFrameDelay, swimFrameStart, idleFrameLoop, backTexture,
                                        array, fallDamage, dashingFrameCount, dashingFrameDelay, dashingFrameStart, buff, flightTimeMax);
        }
Ejemplo n.º 6
0
        public void AddMount(string name, ModMount mount, string texture)
        {
            int id = MountLoader.ReserveMountID();

            mount.mount.Reset();
            mounts[name] = mount;
            MountLoader.Mounts[id] = mount;
            mount.texture = texture;
            mount.mod = this;
        }