mirror of
https://github.com/Relintai/pandemonium_demo_projects.git
synced 2024-12-21 13:56:50 +01:00
17 lines
404 B
GDScript
17 lines
404 B
GDScript
extends KinematicBody2D
|
|
|
|
# Sent to everyone else
|
|
func do_explosion():
|
|
$"AnimationPlayer".play("explode")
|
|
|
|
|
|
# Received by owner of the rock
|
|
func exploded(by_who):
|
|
rpc("do_explosion") # Re-sent to puppet rocks
|
|
$"../../Score".rpc("increase_score", by_who)
|
|
do_explosion()
|
|
|
|
func _ready():
|
|
rpc_config("do_explosion", MultiplayerAPI.RPC_MODE_PUPPET)
|
|
rpc_config("exploded", MultiplayerAPI.RPC_MODE_MASTER)
|