Skip to content

Commit

Permalink
push last-minute-presentation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ekrebs5 committed Jul 26, 2018
1 parent 67b66bc commit a071cff
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 20 deletions.
5 changes: 1 addition & 4 deletions ECS-Core.package/ECSInputSystem.class/instance/update.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@ update
entities do: [:entity | | action |
action := entity inputComponent keyActionMapping at: (self getCharacterForKey: self lastEvent keyValue) ifAbsent: [^ #nothing].
self perform: (action, ':') asSymbol with: entity].
self lastEvent: nil.

"entity motionComponent velocity: (movementDirections
at: (self getCharacterForKey: self lastEvent keyValue)
ifAbsent: entity motionComponent velocity"
self lastEvent: nil
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
"shoot:" : "AR 7/9/2018 16:50",
"supportedPlatformDict" : "ek 7/1/2018 23:28",
"teleport:" : "AR 7/9/2018 20:55",
"update" : "AR 7/6/2018 11:46" } }
"update" : "ek 7/26/2018 11:24" } }
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ componentTypeTemplate

^ 'type
^ #path'
^ #{1}'
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
initialization
createComponent: aComponentName withFields: componentFields

| componentClass componentFieldNames defaultValueSetter |
| componentClass componentFieldNames defaultValueSetter componentSuffix |
componentSuffix := 'Component'.

componentFieldNames := componentFields collect: [:componentField | componentField first].
componentClass := (MCClassDefinition name: aComponentName superclassName: 'ECSComponent' category: 'ECS-Custom' instVarNames: componentFieldNames comment: '') createClass.
componentClass allInstVarNames do: [:instVar |
(RBCreateAccessorsForVariableRefactoring variable: instVar class: componentClass classVariable: false) execute].
defaultValueSetter := componentFields collect: [:componentField |
'instance {1}: {2}.' format: componentField].
componentClass class compile: (self componentConstructorTemplate format: { defaultValueSetter inject: '' into: [:el :result | result , ' ', el]}).
componentClass class compile: self componentTypeTemplate.
componentClass class compile: (self componentTypeTemplate format: {((aComponentName readStream upToAll: componentSuffix) asLowercase)}).
^ componentClass
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
"componentConstructorTemplate" : "AR 6/24/2018 13:50",
"componentSidebar" : "ek 5/14/2018 13:56",
"componentSidebar:" : "ek 5/14/2018 13:56",
"componentTypeTemplate" : "ek 7/10/2018 21:29",
"componentTypeTemplate" : "ek 7/26/2018 11:57",
"componentsForEntityWidget" : "ek 6/22/2018 14:43",
"componentsForEntityWidget:" : "ek 6/22/2018 14:43",
"configureChooseEntityButton" : "ek 6/22/2018 16:26",
"configureChooseEntityButtonIfNeeded" : "ek 6/22/2018 16:22",
"configureComponentDropdownButtonForCurrentEntity" : "ek 6/22/2018 15:45",
"configureComponentDropdownButtonIfNeeded" : "ek 6/22/2018 15:43",
"configureUIElementsIfNeeded" : "ek 6/22/2018 16:23",
"createComponent:withFields:" : "ek 7/10/2018 21:29",
"createComponent:withFields:" : "ek 7/26/2018 12:01",
"createComponentButton:" : "AR 6/22/2018 15:01",
"createComponentSidebar" : "ek 7/10/2018 14:58",
"createComponentsForEntityLabel" : "ek 6/22/2018 15:17",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ initializeFirstSlide
add: ((PHLabel text: 'by Alexander Riese, Eva Krebs')
align: #(center center);
pointSize: 40);
add: ((PHLabel text: 'Prof. Dr. Robert Hirschfeld, Jens Lincke, Stefan Ramson')
add: ((PHLabel text: 'Prof. Dr. Robert Hirschfeld, Dr. Jens Lincke, Stefan Ramson')
align: #(center center);
pointSize: 40);
add: ((PHLabel text: '11 July 2018 - Summer term 2018 - Hasso Plattner Institute - Software Architectures Group')
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@
"createTask3Slide" : "ek 7/9/2018 11:48",
"handlesKeyboard:" : "ek 7/1/2018 23:45",
"initialize" : "ek 7/10/2018 22:40",
"initializeFirstSlide" : "ek 7/9/2018 13:47",
"initializeFirstSlide" : "ek 7/11/2018 11:00",
"keyDown:" : "ek 7/1/2018 23:51",
"keyMapping" : "ek 7/1/2018 23:54",
"keyUp:" : "ek 7/1/2018 23:56",
"outOfWorld:" : "ek 7/10/2018 00:36",
"spacePressed" : "ek 7/1/2018 23:55",
"spacePressed:" : "ek 7/1/2018 23:55",
"wantsToBeDroppedInto:" : "ek 7/10/2018 22:44" } }
"spacePressed:" : "ek 7/1/2018 23:55" } }
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
as yet unclassified
initializePresetEntities

| player dwarf spawn1 spawn2 bush block1 block2 block3 block4 block5 bush2 bush3 |
| player dwarf spawn1 spawn2 bush block1 block2 block3 block4 block5 bush2 bush3 inputDwarf |
super initializePresetEntities.

player := self addEntityNamed: 'Mage'.
Expand All @@ -17,11 +17,19 @@ initializePresetEntities
player positionComponent position: 200@200.
player teleportComponent teleportArea: 750@400.

inputDwarf := ECSInputComponent withStandardValues.
inputDwarf keyActionMapping: Dictionary new.
inputDwarf keyActionMapping at: $w put: #moveUp.
inputDwarf keyActionMapping at: $s put: #moveDown.
inputDwarf keyActionMapping at: $a put: #moveLeft.
inputDwarf keyActionMapping at: $d put: #moveRight.

dwarf := self addEntityNamed: 'Dwarf'.
dwarf addComponent: ECSPositionComponent withStandardValues.
dwarf addComponent: ECSPictureComponent withStandardValues.
dwarf addComponent: ECSHealthComponent withStandardValues.
dwarf addComponent: (ECSCollisionComponent withStandardValues collisionTags: #(destroy)).
dwarf addComponent: inputDwarf.
dwarf pictureComponent picturePath: 'dwarf'.
dwarf positionComponent position: 0@400.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
},
"instance" : {
"initialize" : "ek 7/9/2018 15:41",
"initializePresetEntities" : "ek 7/10/2018 21:57" } }
"initializePresetEntities" : "ek 7/11/2018 10:44" } }

0 comments on commit a071cff

Please sign in to comment.