Esempio n. 1
0
    void Start()
    {
        if (ProximityHitbox != null)
        {
            ProximityHitbox.Initialize();
        }

        if (BodyHitboxes != null)
        {
            for (int i = 0; i < BodyHitboxes.Length; ++i)
            {
                BodyHitboxes[i].Initialize();
            }
        }

        RewinderSnapshot.RegisterGroup(this);
    }
Esempio n. 2
0
 void Start()
 {
     photonView      = GetComponent <PhotonView>();
     snapshotCreator = GetComponent <RewinderSnapshotCreator>();
     if (photonView.isMine)
     {
         hitboxGroup = GetComponent <RewinderHitboxGroup>();
         RewinderSnapshot.RegisterGroup(hitboxGroup);
         if (snapshotCreator != null)
         {
             snapshotCreator.NewSnapshot += HandleNewSnapshot;
         }
     }
     else
     {
         if (snapshotCreator != null)
         {
             snapshotCreator.enabled = false;
         }
     }
 }