コード例 #1
0
 public CameraController(World world, CameraManager cameraManager, Point windowCenter, bool cameraEnabled)
     : base(world)
 {
     this.CameraManager = cameraManager;
     this.CameraEnabled = cameraEnabled;
     this.WindowCenter = windowCenter;
 }
コード例 #2
0
ファイル: WorldState.cs プロジェクト: nigelchanyk/Archetype
 public WorldState(Application application, string scene = "")
     : base(application)
 {
     CameraManager = new CameraManager();
     World = new World(Application.Root, CameraManager, scene);
     CameraManager.CameraChanged += OnActiveCameraChanged;
 }
コード例 #3
0
 public BotController(World world, CameraManager cameraManager, Point windowCenter)
     : base(world, cameraManager, windowCenter, false)
 {
     this.Strategy = new EmptyStrategy(this);
     // TODO: Remove this
     AggressionFactor = 1;
     WaitDelay = 3;
 }
コード例 #4
0
ファイル: BotManager.cs プロジェクト: nigelchanyk/Archetype
 public BotManager(World world, CameraManager cameraManager, BattleSystem battleSystem, string[] playerNames, Point windowCenter)
 {
     this.World = world;
     this.CameraManager = cameraManager;
     this.BattleSystem = battleSystem;
     this.PlayerNames = playerNames;
     this.WindowCenter = windowCenter;
     Reset();
 }
コード例 #5
0
        public MuzzleFlashEffect(World world, Character character, Vector3 weaponWorldPosition)
        {
            this.World = world;
            Billboard = World.CreateDecayableBillboard(BillboardSystemType.MuzzleFlash, character.ConvertWeaponToWorldPosition(weaponWorldPosition));

            for (int i = 0; i < Lights.Length; ++i)
            {
                Lights[i] = World.CreateLight(character.ConvertWeaponToWorldPosition(weaponWorldPosition + GetScaledOffset(LightOffsets[i])));
                Lights[i].Type = Light.LightTypes.LT_POINT;
                Lights[i].SetAttenuation(5, 0, 0, 0.5f);
                // Soften the flash to 30% (remember, there are four lights)
                Lights[i].SetDiffuseColour(0.1f, 0.1f, 0.1f);
            }

            Alive = true;
        }
コード例 #6
0
ファイル: SceneLoader.cs プロジェクト: nigelchanyk/Archetype
        public void ParseDotScene(String SceneName, String groupName, SceneManager yourSceneMgr, SceneNode pAttachNode, List<Vector3> searchGraphVertices, World world)
        {
            // set up shared object values
            GroupName = groupName;
            SceneManager = yourSceneMgr;
            this.StaticObjects = new List<string>();
            this.DynamicObjects = new List<string>();
            this.World = world;
            this.SearchGraphVertices = searchGraphVertices;

            XmlDocument XMLDoc = null;
            XmlElement XMLRoot;

            if (!SceneName.ToLower().EndsWith(".scene"))
                SceneName = SceneName + ".scene";
            DataStreamPtr pStream = ResourceGroupManager.Singleton.OpenResource(SceneName, groupName);

            String data = pStream.AsString;
            // Open the .scene File
            XMLDoc = new XmlDocument();
            XMLDoc.LoadXml(data);
            pStream.Close();

            // Validate the File
            XMLRoot = XMLDoc.DocumentElement;
            if (XMLRoot.Name != "scene")
            {
                LogManager.Singleton.LogMessage("[DotSceneLoader] Error: Invalid .scene File. Missing <scene>");
                return;
            }

            // figure out where to attach any nodes we create
            AttachNode = pAttachNode;
            if (AttachNode == null)
                AttachNode = SceneManager.RootSceneNode;

            // Process the scene
            processScene(XMLRoot);
        }
コード例 #7
0
ファイル: SearchGraph.cs プロジェクト: nigelchanyk/Archetype
 public SearchGraph(World world)
 {
     this.World = world;
 }
コード例 #8
0
 public CompoundEffectManager(World world)
 {
     this.World = world;
 }
コード例 #9
0
ファイル: SceneLoader.cs プロジェクト: nigelchanyk/Archetype
 public void ParseDotScene(String SceneName, String groupName, SceneManager yourSceneMgr, World world)
 {
     ParseDotScene(SceneName, groupName, yourSceneMgr, null, null, world);
 }
コード例 #10
0
ファイル: Controller.cs プロジェクト: nigelchanyk/Archetype
 public Controller(World world)
 {
     this.World = world;
 }
コード例 #11
0
 public GeneralObject(World world)
 {
     this.World = world;
 }