示例#1
0
 void Start()
 {
     avatar    = GameManager.Instance.GetPlayer().GetComponent <PlayerAvatar>();
     maxHealth = avatar.GetMaxHealth();
     bulletGun = avatar.GetComponent <BulletGun>();
     maxEnergy = bulletGun.GetMaxEnergy();
 }
示例#2
0
    //todo
    private void DropAvatar(Vector3 velocity)
    {
        Avatar.Die();
        var rb = Avatar.GetComponent <Rigidbody>();

        rb.useGravity = true;
        rb.mass       = 1;
        rb.velocity   = velocity;
    }