コード例 #1
0
 public void HullDamageIsNoLongerNear(HullDamage hd)
 {
     if (hullDamage == hd)
     {
         hullDamage = null;
     }
 }
コード例 #2
0
 private void ApplyHullDamage(HullDamage hullDamage)
 {
     _tracker.Modify(hullDamage.Timestamp, ship =>
     {
         ship.HullIntegrity = hullDamage.Health;
     });
 }
コード例 #3
0
 internal HullDamageEvent InvokeEvent(HullDamageEvent arg)
 {
     if (_api.ValidateEvent(arg))
     {
         HullDamage?.Invoke(_api, arg);
     }
     return(arg);
 }
コード例 #4
0
    public void StopRepairing()
    {
        TogglePhysics(true);

        currentlyRepairing.LeaveRepair(transform);
        currentlyRepairing.OnRepaired -= StopRepairing;
        currentlyRepairing             = null;
    }
コード例 #5
0
    public void StartRepairing(Grabbable log)
    {
        currentlyRepairing = hullDamage;

        hullDamage = null;

        if (!currentlyRepairing.HasLog() && log != null)
        {
            currentlyRepairing.GiveLog(log);
        }

        TogglePhysics(false);
        currentlyRepairing.OnRepaired += StopRepairing;
        currentlyRepairing.JoinRepair(transform);
    }
コード例 #6
0
 public void HullDamageIsNear(HullDamage hd)
 {
     hullDamage = hd;
 }