-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add propulsion of hosts that show symptoms, Update readme
- Loading branch information
Showing
7 changed files
with
97 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
![CI](https://github.com/h4de5/godot-wusely/workflows/CI/badge.svg) | ||
|
||
# wusely | ||
A godot game simulation about swarming dots | ||
|
||
|
||
Run Simulation on [github Pages](https://h4de5.github.io/godot-wusely/) | ||
|
||
![pjEkZ15k3Z](https://user-images.githubusercontent.com/6115324/77979782-e7404100-7305-11ea-9c49-8130dd3b2c0a.gif) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
extends Node2D | ||
|
||
var tmp = 0 | ||
|
||
func _ready(): | ||
|
||
pass | ||
|
||
func _physics_process(delta: float) -> void: | ||
var sum_speed = 0 | ||
for host in get_tree().get_nodes_in_group("HOST"): | ||
sum_speed += host.direction.length() | ||
|
||
tmp += delta | ||
if tmp > 3: | ||
tmp = 0 | ||
# print("sum speed: ",sum_speed) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters