Example #1
0
        internal void SetupMount(Mount.MountData mountData)
        {
            ModMount newMountData = (ModMount)MemberwiseClone();

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

            if (mount == null)
            {
                return(0);
            }
            return(mount.mount.Type);
        }
Example #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;
        }
Example #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);
            }
        }
Example #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);
        }
Example #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;
        }