Add Player

This commit is contained in:
wjsjwr 2024-11-19 22:24:08 +08:00
parent a19a1fd19f
commit b78ecc1d83
4 changed files with 60 additions and 1 deletions

8
player.tscn Normal file
View File

@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://sbcypicpotp5"]
[ext_resource type="Script" path="res://scripts/PlayerInfo.cs" id="1_qyvq4"]
[node name="Player" type="Node"]
[node name="PlayerInfo" type="Node" parent="."]
script = ExtResource("1_qyvq4")

43
scripts/PlayerInfo.cs Normal file
View File

@ -0,0 +1,43 @@
using Godot;
using System;
public partial class PlayerInfo : Node
{
public class BudgetType {
// 设备费:用于购买设备,升级实验室是指在项目实施过程中购置或试制专用仪
// 器设备,对现有仪器设备进行升级改造,以及租赁外单位仪器设备而发生的费
// 用。计算类仪器设备和软件工具可在设备费科目列支。应当严格控制设备购
// 置,鼓励开放共享、自主研制、租赁专用仪器设备以及对现有仪器设备进行升
// 级改造,避免重复购置。
public int Facility { get; set; }
// 业务费:是指项目实施过程中消耗的各种材料、辅助材料等低值易耗品的采
// 购、运输、装卸、整理等费用,发生的测试化验加工、燃料动力、出版/文献/
// 信息传播/知识产权事务、会议/差旅/国际合作交流等费用,以及其他相关支
// 出。
public int Operational { get; set; }
//劳务费:是指在项目实施过程中支付给参与项目研究的研究生、博士后、访问学
//者以及项目聘用的研究人员、科研辅助人员等的劳务性费用,以及支付给临时聘
//请的咨询专家的费用等。
public int Labor { get; set; }
public int Total => Facility + Operational + Labor;
}
private static uint age;
private static DateOnly date;
public static BudgetType Budget { get; set; }
public static uint Age { get; set; }
public static DateOnly Date { get; set; }
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
}
}

View File

@ -1,4 +1,4 @@
<Project Sdk="Godot.NET.Sdk/4.3.0"> <Project Sdk="Godot.NET.Sdk/4.3.0-limboai-v1.2.2.gha">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework> <TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework>

View File

@ -0,0 +1,8 @@
<Project Sdk="Godot.NET.Sdk/4.3.0">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework>
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
</Project>