Modding:Block and Item Interactions: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
Line 97: Line 97:


                     Vec3f speedVec = new Vec3d(0, 0, 0).Ahead(5, byEntity.Pos.Pitch, byEntity.Pos.Yaw).ToVec3f();
                     Vec3f speedVec = new Vec3d(0, 0, 0).Ahead(5, byEntity.Pos.Pitch, byEntity.Pos.Yaw).ToVec3f();
                     particles.minVelocity = speedVec;
                     particles.MinVelocity = speedVec;
                     Random rand = new Random();
                     Random rand = new Random();
                     particles.color = ColorUtil.ToRGBABytes(ColorUtil.ColorFromArgb(255, rand.Next(0, 255), rand.Next(0, 255), rand.Next(0, 255)));
                     particles.Color = ColorUtil.ToRGBABytes(ColorUtil.ColorFromArgb(255, rand.Next(0, 255), rand.Next(0, 255), rand.Next(0, 255)));
                     particles.minPos = pos.AddCopy(-0.05, -0.05, -0.05);
                     particles.MinPos = pos.AddCopy(-0.05, -0.05, -0.05);
                     particles.addPos.Set(0.1, 0.1, 0.1);
                     particles.AddPos.Set(0.1, 0.1, 0.1);
                     particles.minSize = 0.1F;
                     particles.MinSize = 0.1F;
                     particles.SizeEvolve = EvolvingNatFloat.create(EnumTransformFunction.SINUS, 10);
                     particles.SizeEvolve = EvolvingNatFloat.create(EnumTransformFunction.SINUS, 10);
                     byEntity.World.SpawnParticles(particles);
                     byEntity.World.SpawnParticles(particles);
Line 129: Line 129:


                     Vec3f speedVec = new Vec3d(0, 0, 0).Ahead(5, byEntity.Pos.Pitch, byEntity.Pos.Yaw).ToVec3f();
                     Vec3f speedVec = new Vec3d(0, 0, 0).Ahead(5, byEntity.Pos.Pitch, byEntity.Pos.Yaw).ToVec3f();
                     particles.minVelocity = speedVec;
                     particles.MinVelocity = speedVec;
                     Random rand = new Random();
                     Random rand = new Random();
                     particles.color = ColorUtil.ToRgba(255, rand.Next(0, 255), rand.Next(0, 255), rand.Next(0, 255));
                     particles.Color = ColorUtil.ToRgba(255, rand.Next(0, 255), rand.Next(0, 255), rand.Next(0, 255));
                     particles.minPos = pos.AddCopy(-0.05, -0.05, -0.05);
                     particles.MinPos = pos.AddCopy(-0.05, -0.05, -0.05);
                     particles.addPos.Set(0.1, 0.1, 0.1);
                     particles.AddPos.Set(0.1, 0.1, 0.1);
                     particles.minSize = 0.1F;
                     particles.MinSize = 0.1F;
                     particles.SizeEvolve = EvolvingNatFloat.create(EnumTransformFunction.SINUS, 10);
                     particles.SizeEvolve = EvolvingNatFloat.create(EnumTransformFunction.SINUS, 10);
                     byEntity.World.SpawnParticles(particles);
                     byEntity.World.SpawnParticles(particles);
Confirmedusers, Bureaucrats, editor, Administrators
1,778

edits