public override void UnEquip() { inventory.RemoveItemFromInventory(this); var shotgun = weaponScene.Instance() as Shotgun; shotgun.Position = GetTree().CurrentScene.GetNode <Player>("Player").Position; shotgun.RotationDegrees = Utlities.LookAtMouse(GetGlobalMousePosition(), shotgun.Position); GetTree().CurrentScene.AddChild(shotgun); }
public override void UnEquip() { inventory.RemoveItemFromInventory(this); var rocketLauncher = weaponScene.Instance() as RocketLauncher; rocketLauncher.Position = GetTree().CurrentScene.GetNode <Player>("Player").Position; rocketLauncher.RotationDegrees = Utlities.LookAtMouse(GetGlobalMousePosition(), rocketLauncher.Position); GetTree().CurrentScene.AddChild(rocketLauncher); }
public override void _Process(float delta) { lookDir = GetGlobalMousePosition() - GlobalPosition; RotationDegrees = Utlities.LookAtMouse(GetGlobalMousePosition(), GlobalPosition); Shoot(lookDir, delta); }