Example #1
0
        public Player(Vector3 position, Model model, SoundEffect sound, SoundEffect wind, List<Texture2D> phone, List<Texture2D> phoneInputs, 
            List<Texture2D> phoneEnter, SoundEffect y, SoundEffect n, SoundEffect search, SoundEffect find, SoundEffect success)
        {
            this.yesButton = y;
            this.noButton = n;
            this.search = search;
            this.success = success;
            this.found = find;
            this.phone = phone;
            this.phoneInputs = phoneInputs;
            this.phoneEnter = phoneEnter;
            phoneCurT = phone.First();
            this.sound = sound;
            this.wind = wind;
            camera = new Camera(position);

            controlManager = new ControlManager(0);

            this.model = model;
            this.position = position;
            rotation.Y = MathHelper.Pi;
            rotation.Z = -MathHelper.Pi;
            rotation.X = MathHelper.Pi;

            triedCode = new StringBuilder();

            phoneAnimTimer = new Timer(100, true, phoneAdvFrame);
            phoneAnimTimer.Start();
        }
Example #2
0
        public Animation(AnimationData animationData, bool continuous = true)
        {
            this.animationData = animationData;
            this.timer = new Timer(animationData.interval, true, AdvanceFrame);
            this.continuous = continuous;

            if (continuous)
                timer.Start();
        }
Example #3
0
        public Sun(PlaneTexture planeTex, List<Texture2D> frames)
        {
            this.planeTex = planeTex;
            this.frames = frames;

            timer = new Timer(100, true, () => { frame = Math.Abs(frame - 1); });
            timer.Start();

            //planeTex.effect.EmissiveColor = new Vector3(1, 1, 1);
            planeTex.effect.LightingEnabled = true;
        }