public override List <Requirement> GetRequirments()
        {
            List <Requirement> requirements = new List <Requirement> ();

            requirements.Add(new RangeRequirement(pos, builder.GetEntity().GetComponent <PositionComponent>(), 0.1f));
            return(requirements);
        }
Ejemplo n.º 2
0
 public MoveEvent(IPathfindingInterface pc, BehaviorComponent mover, Vector2 desiredPosition, float moveSpeed)
 {
     this.pc            = pc;
     this.mover         = mover;
     this.moverPosition = mover.GetEntity().GetComponent <PositionComponent> ();
     if (float.IsNaN(desiredPosition.x))
     {
         Debug.Log("SUPER UNCOOL");
     }
     this.desiredPosition = desiredPosition;
     this.moveSpeed       = moveSpeed;
     this.maxDist         = Vector2.Distance(desiredPosition, moverPosition.position);
 }
        public override List <Requirement> GetRequirments()
        {
            List <Requirement> requirements = new List <Requirement> ();

            // TODO add a requirement to be holding a thing.
            requirements.Add(new RangeRequirement(building.GetEntity().GetComponent <PositionComponent>(), builder.GetEntity().GetComponent <PositionComponent>(), 3f));
            return(requirements);
        }