Example #1
0
        public override void Initialize(CameraGameObject puppet)
        {
            base.Initialize(puppet);

            this.forcePuppetToBeGhost();
            this.me = (Ghost)puppet;
        }
Example #2
0
        public override void Initialize(CameraGameObject puppet)
        {
            base.Initialize(puppet);

            this.forcePuppetToBePacMan();
            this.me = (PacMan)puppet;
        }
Example #3
0
        public override void Initialize(CameraGameObject puppet)
        {
            base.Initialize(puppet);

            this.forcePuppetToBePacMan();
            this.me           = (PacMan)puppet;
            this.forbiddenDir = Vector2.Zero;
            this.LastStates   = new Ghost.States[this.Level.Ghosts.Count];
            this.updateGhostStates();
            this.aGhostCanSeeMe             = false;
            this.aGhostCouldSeeMeLastUpdate = false;
        }
Example #4
0
        AI setAI(int id, CameraGameObject puppet)
        {
            AI ai = this.Ais[id];

            ai.Initialize(puppet);
            AI test = ai as AIPlayer;

            if (test != null)
            {
                this.Player = puppet;
            }
            return(ai);
        }
Example #5
0
        private void OnRenderStarted()
        {
            VisualTreeviewer.GameWindow = scene.Window;
            SystemsView.GameWindow      = scene.Window;

            var manager = context.GetEntityManager();

            //
            items.Add(new LoadedItem(this, CameraGameObject.Create(context)));
            items.Add(new LoadedItem(this, LightGameObject.CreateAmbientLight(manager)));
            items.Add(new LoadedItem(this, LightGameObject.CreatePointLight(manager, Vector3.Zero + Vector3.UnitZ * 1000)));
            items.Add(new LoadedItem(this, LightGameObject.CreateDirectionLight(manager, new Vector3(1, 4, 4).Normalized())));
        }
Example #6
0
 public void UpdateSimAIs(string[] gameDatas)
 {
     for (int i = 0; i < gameDatas.Length; i++)
     {
         if (gameDatas[i] != null)
         {
             CameraGameObject cgo = this.GetGameObject(i);
             if (!cgo.IsPlayer())
             {
                 ((AISim)cgo.AI).DirectionVector = cgo.UnitVecFromInt(int.Parse(gameDatas[i]));
             }
         }
     }
 }
Example #7
0
        public void AddScoreParticle(CameraGameObject player, int score, Vector2 position, bool moveText = false, amulware.Graphics.Color?color = null)
        {
            if (!player.IsPlayer())
            {
                return;
            }
            Vector2 offset        = Vector2.Zero;
            float   awesomeFactor = score / 900f + 0.5f;

            if (moveText)
            {
                RandomVector2 rv = new RandomVector2(1);
                offset = rv.Create2() * awesomeFactor;
            }
            if (!color.HasValue)
            {
                color = amulware.Graphics.Color.White;
            }
            this.particleSystem.Add(new ScoreText(score, position + offset, this.Graphics, awesomeFactor, color.Value));
        }
Example #8
0
 public virtual void Initialize(CameraGameObject puppet)
 {
     this.Puppet = puppet;
 }