Beispiel #1
0
        public void PlaceAction(Point mapLocation, Point targetLocation, Vector2 actualPosition, Gameplay.Grid.Buckets bucketSystem)
        {
            if (ActionType == Actions.ActionType.ListenAction)
            {
                throw new Exception("Tried to place listen action with too many parameters");
            }

            ActionPosition = mapLocation;
            ActionDirection = targetLocation;

            ActionState = Actions.ActionState.Active;

            bucketSystem.addNewAction(this, (int)mapLocation.X, (int)mapLocation.Y);

            SetRectangle(new Rectangle(-33, -32, 96, 93));
        }
Beispiel #2
0
        public void PlaceAction(Point mapLocation, Gameplay.Grid.Buckets bucketSystem, Rectangle gridLocation)
        {
            if (ActionType == Actions.ActionType.DirectAction)
            {
                throw new Exception("Tried to place direct action without a direction");
            }

            bucketSystem.addNewAction(this, gridLocation.Center.X, gridLocation.Center.Y);

            ActionPosition = mapLocation;

            ActionState = Actions.ActionState.Active;

            SetRectangle(new Rectangle(-33, -32, 96, 93));
        }