mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-15 15:52:34 +00:00
Centered helipad building, added barracks and helipad.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 694 B After Width: | Height: | Size: 613 B |
Binary file not shown.
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.5 KiB |
@@ -16,7 +16,7 @@
|
|||||||
id="svg134"
|
id="svg134"
|
||||||
sodipodi:docname="helipad.svg"
|
sodipodi:docname="helipad.svg"
|
||||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||||
inkscape:export-filename="/home/cyberarm/Code/i-mic-rts/assets/buildings/helipad/helipad_overlay.png"
|
inkscape:export-filename="/home/cyberarm/Code/i-mic-rts/assets/buildings/helipad/helipad_shell.png"
|
||||||
inkscape:export-xdpi="96"
|
inkscape:export-xdpi="96"
|
||||||
inkscape:export-ydpi="96">
|
inkscape:export-ydpi="96">
|
||||||
<defs
|
<defs
|
||||||
@@ -46,11 +46,11 @@
|
|||||||
inkscape:pageopacity="0.0"
|
inkscape:pageopacity="0.0"
|
||||||
inkscape:pageshadow="2"
|
inkscape:pageshadow="2"
|
||||||
inkscape:zoom="5.6"
|
inkscape:zoom="5.6"
|
||||||
inkscape:cx="-2.420726"
|
inkscape:cx="19.007845"
|
||||||
inkscape:cy="46.325261"
|
inkscape:cy="41.222516"
|
||||||
inkscape:document-units="px"
|
inkscape:document-units="px"
|
||||||
inkscape:current-layer="layer1"
|
inkscape:current-layer="layer1"
|
||||||
showgrid="false"
|
showgrid="true"
|
||||||
inkscape:snap-bbox="true"
|
inkscape:snap-bbox="true"
|
||||||
inkscape:bbox-paths="true"
|
inkscape:bbox-paths="true"
|
||||||
inkscape:bbox-nodes="true"
|
inkscape:bbox-nodes="true"
|
||||||
@@ -70,11 +70,16 @@
|
|||||||
inkscape:snap-page="true"
|
inkscape:snap-page="true"
|
||||||
inkscape:snap-object-midpoints="true"
|
inkscape:snap-object-midpoints="true"
|
||||||
inkscape:snap-center="true"
|
inkscape:snap-center="true"
|
||||||
inkscape:window-width="1920"
|
inkscape:window-width="1600"
|
||||||
inkscape:window-height="1006"
|
inkscape:window-height="834"
|
||||||
inkscape:window-x="0"
|
inkscape:window-x="0"
|
||||||
inkscape:window-y="0"
|
inkscape:window-y="0"
|
||||||
inkscape:window-maximized="1" />
|
inkscape:window-maximized="1">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid1061"
|
||||||
|
empspacing="8" />
|
||||||
|
</sodipodi:namedview>
|
||||||
<metadata
|
<metadata
|
||||||
id="metadata131">
|
id="metadata131">
|
||||||
<rdf:RDF>
|
<rdf:RDF>
|
||||||
@@ -83,7 +88,7 @@
|
|||||||
<dc:format>image/svg+xml</dc:format>
|
<dc:format>image/svg+xml</dc:format>
|
||||||
<dc:type
|
<dc:type
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
<dc:title />
|
<dc:title></dc:title>
|
||||||
</cc:Work>
|
</cc:Work>
|
||||||
</rdf:RDF>
|
</rdf:RDF>
|
||||||
</metadata>
|
</metadata>
|
||||||
@@ -94,53 +99,56 @@
|
|||||||
transform="translate(0,-271.60001)">
|
transform="translate(0,-271.60001)">
|
||||||
<path
|
<path
|
||||||
style="fill:#ce5c00;stroke:#000000;stroke-width:1;filter:url(#filter8585)"
|
style="fill:#ce5c00;stroke:#000000;stroke-width:1;filter:url(#filter8585)"
|
||||||
d="m 46.25,18.892578 c -4.250756,-4.75e-4 -7.696999,5.485118 -7.697266,9.785156 9.34e-4,0.432665 0.03752,0.864499 0.109375,1.291016 -6.793419,2.331344 -12.139333,7.654215 -14.5,14.4375 -0.430703,-0.0778 -0.867179,-0.118316 -1.304687,-0.121094 -4.251511,-4.76e-4 -9.698066,3.486309 -9.697266,7.78711 2.67e-4,4.300038 5.44651,7.785631 9.697266,7.785156 0.443213,1.74e-4 0.885613,-0.03838 1.322266,-0.115234 2.356686,6.782948 7.698048,12.107748 14.488281,14.443359 -0.07318,0.422493 -0.111725,0.850382 -0.115235,1.279297 2.67e-4,4.300038 3.44651,9.785631 7.697266,9.785156 4.250756,4.75e-4 7.696999,-5.485118 7.697266,-9.785156 -0.001,-0.435982 -0.03828,-0.871106 -0.111328,-1.300782 6.787242,-2.332729 12.128066,-7.651954 14.488281,-14.429687 0.435143,0.07925 0.876228,0.120415 1.318359,0.123047 4.250756,4.76e-4 9.696999,-3.485118 9.697266,-7.785156 8e-4,-4.300801 -5.445755,-7.787586 -9.697266,-7.78711 -0.443269,4.71e-4 -0.885669,0.03968 -1.322266,0.117188 -2.356182,-6.783693 -7.69762,-12.10929 -14.488281,-14.445313 0.07318,-0.422493 0.111725,-0.850382 0.115235,-1.279297 -2.67e-4,-4.300038 -3.44651,-9.785631 -7.697266,-9.785156 z"
|
d="m 46.25,18.892578 c -4.250756,-4.75e-4 -7.696999,5.485118 -7.697266,9.785156 9.34e-4,0.432665 0.03752,0.864499 0.109375,1.291016 -6.793419,2.331344 -12.139333,7.654215 -14.5,14.4375 -0.430703,-0.0778 -0.867179,-0.118316 -1.304687,-0.121094 -4.251511,-4.76e-4 -9.698066,3.486309 -9.697266,7.78711 2.67e-4,4.300038 5.44651,7.785631 9.697266,7.785156 0.443213,1.74e-4 0.885613,-0.03838 1.322266,-0.115234 2.356686,6.782948 7.698048,12.107748 14.488281,14.443359 -0.07318,0.422493 -0.111725,0.850382 -0.115235,1.279297 2.67e-4,4.300038 3.44651,9.785631 7.697266,9.785156 4.250756,4.75e-4 7.696999,-5.485118 7.697266,-9.785156 -10e-4,-0.435982 -0.03828,-0.871106 -0.111328,-1.300782 6.787242,-2.332729 12.128066,-7.651954 14.488281,-14.429687 0.435143,0.07925 0.876228,0.120415 1.318359,0.123047 4.250756,4.76e-4 9.696999,-3.485118 9.697266,-7.785156 8e-4,-4.300801 -5.445755,-7.787586 -9.697266,-7.78711 -0.443269,4.71e-4 -0.885669,0.03968 -1.322266,0.117188 -2.356182,-6.783693 -7.69762,-12.10929 -14.488281,-14.445313 0.07318,-0.422493 0.111725,-0.850382 0.115235,-1.279297 -2.67e-4,-4.300038 -3.44651,-9.785631 -7.697266,-9.785156 z"
|
||||||
transform="matrix(0.26458332,0,0,0.26458332,0,271.60001)"
|
transform="matrix(0.26458332,0,0,0.26458332,0.46302091,270.52281)"
|
||||||
id="path140"
|
id="path140"
|
||||||
inkscape:connector-curvature="0"
|
inkscape:connector-curvature="0"
|
||||||
sodipodi:nodetypes="ccccccccccccccccccccc" />
|
sodipodi:nodetypes="ccccccccccccccccccccc" />
|
||||||
<circle
|
<circle
|
||||||
style="fill:#fcaf3e;stroke:#000000;stroke-width:0.26458332;filter:url(#filter8581)"
|
style="fill:#fcaf3e;stroke:#000000;stroke-width:0.26458332;filter:url(#filter8581)"
|
||||||
id="path1045"
|
id="path1045"
|
||||||
cx="12.376776"
|
cx="12.839797"
|
||||||
cy="285.23511"
|
cy="284.1579"
|
||||||
r="4.3692036" />
|
r="4.3692036" />
|
||||||
<rect
|
<g
|
||||||
style="fill:#a40000;stroke:#000000;stroke-width:0.26458332"
|
id="g1084">
|
||||||
id="rect947"
|
<rect
|
||||||
width="2.1166666"
|
y="283.2417"
|
||||||
height="2.1166666"
|
x="11.641666"
|
||||||
x="11.178645"
|
height="2.1166666"
|
||||||
y="284.31891" />
|
width="2.1166666"
|
||||||
<rect
|
id="rect947"
|
||||||
style="fill:#a40000;stroke:#000000;stroke-width:0.26458332"
|
style="fill:#a40000;stroke:#000000;stroke-width:0.26458332" />
|
||||||
id="rect947-3"
|
<rect
|
||||||
width="2.1166666"
|
y="279.16901"
|
||||||
height="2.1166666"
|
x="11.641666"
|
||||||
x="11.178645"
|
height="2.1166666"
|
||||||
y="280.24622" />
|
width="2.1166666"
|
||||||
<rect
|
id="rect947-3"
|
||||||
style="fill:#a40000;stroke:#000000;stroke-width:0.26458332"
|
style="fill:#a40000;stroke:#000000;stroke-width:0.26458332" />
|
||||||
id="rect947-6"
|
<rect
|
||||||
width="2.1166666"
|
y="287.31436"
|
||||||
height="2.1166666"
|
x="11.641666"
|
||||||
x="11.178645"
|
height="2.1166666"
|
||||||
y="288.39157" />
|
width="2.1166666"
|
||||||
<rect
|
id="rect947-6"
|
||||||
style="fill:#a40000;stroke:#000000;stroke-width:0.26458332"
|
style="fill:#a40000;stroke:#000000;stroke-width:0.26458332" />
|
||||||
id="rect947-3-7"
|
<rect
|
||||||
width="2.1166666"
|
transform="rotate(90)"
|
||||||
height="2.1166666"
|
y="-17.831017"
|
||||||
x="284.27167"
|
x="283.19446"
|
||||||
y="-17.367996"
|
height="2.1166666"
|
||||||
transform="rotate(90)" />
|
width="2.1166666"
|
||||||
<rect
|
id="rect947-3-7"
|
||||||
style="fill:#a40000;stroke:#000000;stroke-width:0.26458332"
|
style="fill:#a40000;stroke:#000000;stroke-width:0.26458332" />
|
||||||
id="rect947-6-5"
|
<rect
|
||||||
width="2.1166666"
|
transform="rotate(90)"
|
||||||
height="2.1166666"
|
y="-9.685647"
|
||||||
x="284.27167"
|
x="283.19446"
|
||||||
y="-9.2226257"
|
height="2.1166666"
|
||||||
transform="rotate(90)" />
|
width="2.1166666"
|
||||||
|
id="rect947-6-5"
|
||||||
|
style="fill:#a40000;stroke:#000000;stroke-width:0.26458332" />
|
||||||
|
</g>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.7 KiB |
9
lib/entities/buildings/barracks.rb
Normal file
9
lib/entities/buildings/barracks.rb
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
IMICRTS::Entity.define_entity(:barracks, :building, 400, "Builds and soldiers") do |entity|
|
||||||
|
entity.radius = 44
|
||||||
|
entity.max_health = 100.0
|
||||||
|
|
||||||
|
entity.shell_image = "buildings/barracks/barracks.png"
|
||||||
|
|
||||||
|
entity.on_tick do
|
||||||
|
end
|
||||||
|
end
|
||||||
10
lib/entities/buildings/helipad.rb
Normal file
10
lib/entities/buildings/helipad.rb
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
IMICRTS::Entity.define_entity(:helipad, :building, 1_000, "Builds and rearms helicopters") do |entity|
|
||||||
|
entity.radius = 26
|
||||||
|
entity.max_health = 100.0
|
||||||
|
|
||||||
|
entity.shell_image = "buildings/helipad/helipad_shell.png"
|
||||||
|
entity.overlay_image = "buildings/helipad/helipad_overlay.png"
|
||||||
|
|
||||||
|
entity.on_tick do
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -46,6 +46,7 @@ class IMICRTS
|
|||||||
raise "Failed to find entity #{name.inspect} definition"
|
raise "Failed to find entity #{name.inspect} definition"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@boid_radius = @radius + 8
|
||||||
component(:turret).angle = @angle if component(:turret)
|
component(:turret).angle = @angle if component(:turret)
|
||||||
|
|
||||||
@goal_color = Gosu::Color.argb(175, 25, 200, 25)
|
@goal_color = Gosu::Color.argb(175, 25, 200, 25)
|
||||||
@@ -149,6 +150,7 @@ class IMICRTS
|
|||||||
|
|
||||||
def draw_radius
|
def draw_radius
|
||||||
Gosu.draw_circle(@position.x, @position.y, @radius, ZOrder::ENTITY_RADIUS, @player.color, 360 / 18)
|
Gosu.draw_circle(@position.x, @position.y, @radius, ZOrder::ENTITY_RADIUS, @player.color, 360 / 18)
|
||||||
|
Gosu.draw_circle(@position.x, @position.y, @boid_radius, ZOrder::ENTITY_RADIUS, @player.color, 360 / 18)
|
||||||
end
|
end
|
||||||
|
|
||||||
def draw_gizmos
|
def draw_gizmos
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
class IMICRTS
|
class IMICRTS
|
||||||
class Closing < CyberarmEngine::GuiState
|
class Closing < CyberarmEngine::GuiState
|
||||||
def setup
|
def setup
|
||||||
|
window.show_cursor = false
|
||||||
@logo = Gosu::Image.new("#{ASSETS_PATH}/logo.png")
|
@logo = Gosu::Image.new("#{ASSETS_PATH}/logo.png")
|
||||||
@color = Gosu::Color.new(0xffffffff)
|
@color = Gosu::Color.new(0xffffffff)
|
||||||
|
|
||||||
|
|||||||
@@ -107,6 +107,22 @@ class IMICRTS
|
|||||||
position: CyberarmEngine::Vector.new(spawnpoint.x + 130, spawnpoint.y - 64, ZOrder::BUILDING),
|
position: CyberarmEngine::Vector.new(spawnpoint.x + 130, spawnpoint.y - 64, ZOrder::BUILDING),
|
||||||
angle: 0
|
angle: 0
|
||||||
)
|
)
|
||||||
|
@player.entities << Entity.new(
|
||||||
|
name: :helipad,
|
||||||
|
director: @director,
|
||||||
|
player: @player,
|
||||||
|
id: @player.next_entity_id,
|
||||||
|
position: CyberarmEngine::Vector.new(spawnpoint.x - 32, spawnpoint.y - 96, ZOrder::BUILDING),
|
||||||
|
angle: 0
|
||||||
|
)
|
||||||
|
@player.entities << Entity.new(
|
||||||
|
name: :barracks,
|
||||||
|
director: @director,
|
||||||
|
player: @player,
|
||||||
|
id: @player.next_entity_id,
|
||||||
|
position: CyberarmEngine::Vector.new(spawnpoint.x - 32, spawnpoint.y + 128, ZOrder::BUILDING),
|
||||||
|
angle: 0
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def draw
|
def draw
|
||||||
|
|||||||
Reference in New Issue
Block a user