protected override Player CreatePlayer(string actorName, int actorNumber, bool isLocal, Hashtable actorProperties)
    {
        RealtimePlayer tmpPlayer = null;

        if (this.CurrentRoom != null)
        {
            tmpPlayer = (RealtimePlayer)this.CurrentRoom.GetPlayer(actorNumber);
        }

        if (tmpPlayer == null)
        {
            tmpPlayer = new RealtimePlayer(actorName, actorNumber, isLocal);
            tmpPlayer.InternalCacheProperties(actorProperties);

            if (this.CurrentRoom != null)
            {
                this.CurrentRoom.StorePlayer(tmpPlayer);
            }
        }
        else
        {
            this.DebugReturn(DebugLevel.ERROR, "Player already listed: " + actorNumber);
        }

        return(tmpPlayer);
    }
예제 #2
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            RealPlayer = GetTemplateChild("PART_Player") as RealtimePlayer;
            _header    = GetTemplateChild("PART_Header") as Grid;
            if (_header != null)
            {
                _header.MouseDown += Header_MouseDown;
            }
        }
예제 #3
0
파일: Plane.cs 프로젝트: Fim1am/planes
    public void InitPlane(int _planeId, bool _isLocal, string _displayName, int _skinIndex, Vector3 _position, Vector3 _direction)
    {
        if (_isLocal)
        {
            gameObject.AddComponent <PlaneController>();
        }

        RTPlayer  = new RealtimePlayer(_displayName, _isLocal);
        PlaneId   = _planeId;
        SkinIndex = _skinIndex;
        SetTransform(_direction, _position);
    }