mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Time modifiers
This commit is contained in:
parent
690bae01bc
commit
4e6257dbe3
6 changed files with 99 additions and 9 deletions
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Cirno.Scripts.Resources;
|
||||
using Godot;
|
||||
using Godot.Collections;
|
||||
|
||||
namespace Cirno.Scripts.Components;
|
||||
|
||||
|
|
@ -20,9 +22,11 @@ public partial class BulletSpawner : Node2D
|
|||
{
|
||||
var bullet = this.CreateChildOf<Bullet>(_gameManager.BulletsContainer, bulletInfo.BulletScene ?? BulletScene, bulletInfo.Position);
|
||||
|
||||
bullet.Initialize(bulletInfo);
|
||||
|
||||
//var bullet = BulletScene.Instantiate<Bullet>();
|
||||
bullet.Position = bulletInfo.Position;
|
||||
bullet.Owner = bulletInfo.Owner;
|
||||
//bullet.Position = bulletInfo.Position;
|
||||
//bullet.Owner = bulletInfo.Owner;
|
||||
//bullet.Speed = speed;
|
||||
|
||||
float modifiedSpeed = bulletInfo.Modifier?.ModifySpeed(bulletInfo.Speed, i, bulletInfo.BulletCount) ?? bulletInfo.Speed;
|
||||
|
|
@ -93,4 +97,5 @@ public class BulletInfo
|
|||
public float Spread { get; set; }
|
||||
public PackedScene BulletScene { get; set; }
|
||||
public IBulletModifier Modifier { get; set; }
|
||||
public List<TimeModifier> TimeModifiers { get; set; } = new List<TimeModifier>();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue