Untitled
Nullyx
csharp
a year ago
1.4 kB
6
Indexable
Never
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Character : MonoBehaviour { public class CharacterProp { public string name; public int health; public int power; public int speed; public int turnSpeed; public int experience; public int useWeaponAbility; public int level; public CharacterProp(string name, int health, int power, int speed, int turnSpeed, int experience, int useWeaponAbility, int level, int wage) { this.name = name; this.health = health; this.power = power; this.speed = speed; this.turnSpeed = turnSpeed; this.experience = experience; this.useWeaponAbility = useWeaponAbility; this.level = level; } } public class Stuff { public int bullets; public int grenades; public int guns; public Stuff(int bullets, int grenades, int guns) { this.bullets = bullets; this.grenades = grenades; this.guns = guns; } } public Stuff myStuff = new Stuff(15,0,1); public CharacterProp charachterProp=new CharacterProp("",100,1,1,1,1,1,1,1); public Rigidbody bulletPrefab; public Transform firePosition; public float bulletSpeed; }