示例#1
0
        public VanillaPlayer(CharacMgr characMgr, string meshName, CharacterInfo info)
            : base(characMgr, info)
        {
            SceneManager sceneMgr = characMgr.SceneMgr;
            Entity ent = sceneMgr.CreateEntity("CharacterEnt_" + this.mCharInfo.Id, meshName);
            ent.Skeleton.BlendMode = SkeletonAnimationBlendMode.ANIMBLEND_CUMULATIVE;
            Entity swordL = sceneMgr.CreateEntity("Sword.mesh");
            ent.AttachObjectToBone("Sheath.L", swordL);
            Entity swordR = sceneMgr.CreateEntity("Sword.mesh");
            ent.AttachObjectToBone("Sheath.R", swordR);
            this.mMesh = new Sinbad(ent);

            this.mNode = characMgr.SceneMgr.RootSceneNode.CreateChildSceneNode("CharacterNode_" + this.mCharInfo.Id, Vector3.ZERO, this.mMesh.InitialOrientation);
            this.mNode.AttachObject(ent);
            this.mNode.Scale(this.mMesh.MeshSize / ent.BoundingBox.Size);
            this.mNode.Orientation = this.mMesh.InitialOrientation;

            this.mShootCube = new ShootCube(this.mCharacMgr.BulletMgr, this);
            this.FinishCreation();
        }
示例#2
0
 public void AttachCharacMgr(CharacMgr characMgr)
 {
     this.CharacMgr = characMgr;
 }
示例#3
0
 public void AttachCharacMgr(CharacMgr characMgr)
 {
     this.CharacMgr = characMgr;
 }