public override void Send(string from, string to, string threatMessage) { ARobot robot = _robots[to]; if (robot != null) { robot.Receive(from, threatMessage); } }
public override void Register(ARobot robot) { if (!_robots.ContainsValue(robot)) { _robots[robot.Id] = robot; } robot.FightRoom = this; }
///------------------------------------------------------------------------ ///----------------------------------------------------------------------- /// /// <summary> /// Загруза игровых ресурсов /// </summary> /// ///------------------------------------------------------------------------ protected override void LoadContent() { mSpriteBatch = new SpriteBatch(GraphicsDevice); loadTexture("robot_1"); //создаем роботов var robot = new ARobot("robot_1"); mWorld.append(robot); mWorld.append(new APlayer(robot)); }
public abstract void Register(ARobot robot);
public void Notify(ARobot robot) { Console.WriteLine("I, " + Name + ", received notification from: " + robot.Id + " that has the energy level: " + robot.EnergyLevel); }