Пример #1
0
 public void Create(int objId, bool isPlayer)
 {
     m_Actor = GameObjectIdManager.Instance.GenNextId();
     if (isPlayer)
     {
         GfxSystem.CreateGameObject(m_Actor, "Arrow_Red", m_ObjectInfo);
     }
     else
     {
         GfxSystem.CreateGameObject(m_Actor, "Arrow_Blue", m_ObjectInfo);
     }
 }
Пример #2
0
        protected void CreateActor(int objId, string model, Vector3 pos, float dir, float scale = 1.0f)
        {
            Init();

            m_ObjId = objId;
            m_Actor = GameObjectIdManager.Instance.GenNextId();
            m_ObjectInfo.m_LogicObjectId = objId;
            m_ObjectInfo.X       = pos.X;
            m_ObjectInfo.Y       = pos.Y;
            m_ObjectInfo.Z       = pos.Z;
            m_ObjectInfo.FaceDir = dir;
            m_ObjectInfo.Sx      = scale;
            m_ObjectInfo.Sy      = scale;
            m_ObjectInfo.Sz      = scale;
            GfxSystem.CreateGameObject(m_Actor, model, m_ObjectInfo);
        }