Пример #1
0
        public void fireRez(Sansar.Vector position, Sansar.Vector fwd, Sansar.Quaternion orientation)
        {
            Sansar.Vector rezPosition;
            if (Sound_To_Play != null)
            {
                ScenePrivate.PlaySoundAtPosition(Sound_To_Play, position, PlaySettings.PlayOnce);
            }
            for (int i = 0; i < numberOfRez; i++)
            {
                //so i starts at 0, and will eventually be spacing away, if we add .5 that means .5 of fwd which means if the object is centered
                //it will come right out of our av, .6 is 10% more so we dont hit ourself
                rezPosition = position + offset +
                              (
                    fwd * (spacing * (i + .6f))
                              );

                ScenePrivate.CreateCluster(
                    Bullet_Object,
                    rezPosition,
                    orientation,
                    Sansar.Vector.Zero,
                    CreateClusterHandler
                    );
                Wait(TimeSpan.FromSeconds(.1));
            }
        }