-
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.
feat:improve rust antimation feat:star wrath development
- Loading branch information
Showing
13 changed files
with
145 additions
and
78 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
extends Area2D | ||
|
||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready() -> void: | ||
#print(self.modulate.a) | ||
pass # Replace with function body. | ||
|
||
|
||
# Called every frame. 'delta' is the elapsed time since the previous frame. | ||
func _process(_delta: float) -> void: | ||
pass | ||
|
||
|
||
func general_hide(): | ||
var tween = create_tween() | ||
var cp = self.modulate | ||
cp.a = 0 | ||
tween.tween_property(self, "modulate", cp, 0.15) | ||
tween.tween_callback(self.hide) | ||
|
||
|
||
func show_wrapper(): | ||
self.modulate.a = 1 | ||
show() |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
extends Node | ||
|
||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready() -> void: | ||
if get_tree().current_scene == self: | ||
$StarWrath.start() | ||
else: | ||
$StarWrath.hide() | ||
|
||
|
||
# Called every frame. 'delta' is the elapsed time since the previous frame. | ||
func _process(_delta: float) -> void: | ||
pass |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
shader_type canvas_item; | ||
|
||
void vertex() { | ||
// Called for every vertex the material is visible on. | ||
} | ||
|
||
void fragment() { | ||
// Called for every pixel the material is visible on. | ||
vec2 screen_coords = SCREEN_UV; | ||
// 垂直翻转Y坐标 | ||
screen_coords.y = (1.0 - screen_coords.y); | ||
// 紫色 | ||
vec4 purple_color = vec4(0.5, 0.0, 0.5, 1.0); | ||
// 半透明紫色 | ||
vec4 transparent_purple = vec4(0.5, 0.0, 0.5, 0.5); | ||
vec4 gradient_color = purple_color + (transparent_purple - purple_color) * screen_coords.y * 3.6; | ||
// 设置最终颜色 | ||
COLOR = gradient_color; | ||
} | ||
|
||
//void light() { | ||
// Called for every pixel for every light affecting the CanvasItem. | ||
// Uncomment to replace the default light processing function with this one. | ||
//} |