Inheritance: MovableGameObject
 public override MovableGameObject CreateNonVisibleAgent()
 {
     RogueAgent agent = new RogueAgent(GetInitPosition(), null);
     AddGameObject(agent);
     Agent = agent;
     return agent;
 }
 public override MovableGameObject CreateAgent(PointF p, float size = 1.0f)
 {
     RogueAgent agent = new RogueAgent(p, size);
     AddGameObject(agent);
     Agent = agent;
     return agent;
 }
        public override MovableGameObject CreateNonVisibleAgent()
        {
            RogueAgent agent = new RogueAgent(GetInitPosition(), null);

            AddGameObject(agent);
            Agent = agent;
            return(agent);
        }
        public override MovableGameObject CreateAgent(PointF p, float size = 1.0f)
        {
            RogueAgent agent = new RogueAgent(p, size);

            AddGameObject(agent);
            Agent = agent;
            return(agent);
        }
Exemple #5
0
        public PointF GetInitPosition()
        {
            SizeF agentPos = Agent == null
                ? RogueAgent.GetDefaultSize()
                : Agent.Size;

            return(new PointF((Scene.Width - agentPos.Width) / 2, (Scene.Height - agentPos.Height) / 2));
        }
        public override MovableGameObject CreateAgent()
        {
            RogueAgent agent = CreateAgent(GetInitPosition()) as RogueAgent;

            return(agent);
        }