Ejemplo n.º 1
0
 public ShootCube(BulletManager bulletManager, VanillaPlayer source)
 {
     this.mSource = source;
     this.mBulletMgr = bulletManager;
     this.mTimeSinceLastBall = new Timer();
     this.mCamera = this.mBulletMgr.SceneMgr.GetCamera("Camera");
     this.mMaterials = new string[] { "fireball", "waterball", "magicball" };
 }
Ejemplo n.º 2
0
        public void AddCharacter(CharacterInfo info)
        {
            if (info.RTS == null)
            {
                if (info.Faction == Faction.Red)
                {
                    info.RTS = this.mStateMgr.MainState.RTSMgr.AIRTS;
                }
                else
                {
                    info.RTS = this.mStateMgr.MainState.RTSMgr.PlayerRTS;
                }
            }

            if (info.IsPlayer)
            {
                if (this.mStateMgr.GameInfo.IsInEditorMode)
                {
                    throw new Exception("Can't add player in the story editor");
                }

                VanillaPlayer player = new VanillaPlayer(this, SINBAD_MESH, info);
                this.mCharacters[(int)info.Faction].Add(player);
                if (this.MainPlayer == null)
                {
                    player.MakeHimMainPlayer(this.mUser);
                    this.MainPlayer = player;
                }
            }
            else
            {
                this.mCharacters[(int)info.Faction].Add(new VanillaNonPlayer(this, ROBOT_MESH, info));
            }

            LogManager.Singleton.DefaultLog.LogMessage("Character " + info.Name + " added");
        }