예제 #1
0
        protected override void OnValidate()
        {
            base.OnValidate();

            if (CanValidate())
            {
                if (dZPlayer == null)
                {
                    dZPlayer = GetComponentInHierarchy <DropZonePlayer>();
                    playerID = dZPlayer.PlayerID;
                    owner    = dZPlayer.GetOwner();
                }
            }
        }
예제 #2
0
        protected override void Start()
        {
            base.Start();

            if (dZPlayer == null)
            {
                dZPlayer = GetComponentInHierarchy <DropZonePlayer>();
            }
            if (IS_NOT_NULL(dZPlayer))
            {
                playerID = dZPlayer.PlayerID;
                owner    = dZPlayer.GetOwner();
            }

            // Disable collision if not locally owned
            if (IS_NOT_NULL(myCollider) &&
                owner != BEventManager.Instance.LocalNetworkID)
            {
                myCollider.enabled = false;
            }
        }