예제 #1
0
 private void World_OnAdd(StatefulObject obj)
 {
     if (obj.ID == currentOwnedObject && !obj.GetComponent <IInputController>().Enabled)
     {
         obj.GetComponent <IInputController>().SetEnabled(true);
     }
 }
예제 #2
0
파일: Remote.cs 프로젝트: xyberviri/Davinet
        private void StatefulWorld_OnAdd(StatefulObject obj)
        {
            if (arbiter)
            {
                IdentifiableObject o = obj.GetComponent <IdentifiableObject>();

                // Only the arbiter is permitted to relinquish an object's authority;
                // non-arbiter remotes will hang on to authority until they receive confirmation
                // from the arbiter that the object has relinquished.
                o.GetComponent <StatefulObject>().Ownable.CanRelinquishAuthority = true;
                objectsToSpawn.Add(obj.ID, o);
            }
        }