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(); }
public void AttachCharacMgr(CharacMgr characMgr) { this.CharacMgr = characMgr; }