Example #1
0
 //Main Method for Mine
 protected override void MineWork()
 {
     if (EnoughEnergy)
     {
         ResourceManager.AddResouce(ResourceManager.Resource.NANITEN, 1);
     }
 }
Example #2
0
    private void LivingHouseWork()
    {
        uint resValue = this.CurrentResource;

        ResourceManager.AddResouce(ResourceManager.Resource.MAXLABORER, resValue);
        currentResidentHuman = resValue;
    }
Example #3
0
 static private void Load_resources()
 {
     m_textures.AddResouce("test", new Texture("tex/Test.png"));
     m_fonts.AddResouce("FreeSans", new Text("fonts/FreeSans.ttf"));
     //Play on My headphone, the default is 0
     mPlayer.Open("snd/Requiem.mp3", SoundPlayer.Devices[1]);
     m_snds.AddResouce("music", mPlayer);
 }
Example #4
0
        public Window(GameWindowSettings gameWindowSettings, NativeWindowSettings nativeWindowSettings)
            : base(gameWindowSettings, nativeWindowSettings)
        {
            Load_resources();
            m_entities = new List <Entity>();

            ScreenSize = new vec2(1024.0f, 576.0f);

            var texture = m_textures.GetResource("test");

            m_subTexs.AddResouce(0, SubTexture.CreateFromCoords(texture.textureID, new vec2(texture.Width, texture.Height), new vec2(1, 0), new vec2(64, 64)));
            props         = ParticleProps.Effect2;
            props.Gravity = 0.0f;
            emiter        = new ParticlesSystem();
        }
Example #5
0
    //--- Startup and Main-functionality:
    //###############################################################################
    void Awake()
    {
        GoodOrEvil    = new FoE(goodOrEvil);
        LifebarScript = ScriptableObject.CreateInstance <Lifebar>();
        Options       = gameObject.GetComponent <UnitOptions>();
        if (!gameObject.GetComponentInChildren <UnitWeapon>())
        {
            weapon = gameObject.AddComponent <NoWeapon>();
        }
        else
        {
            weapon = gameObject.GetComponentInChildren <UnitWeapon>();
        }

        if (!IsABuilding && this.GoodOrEvil == FoE.GOODorEVIL.Good)
        {
            ResourceManager.AddResouce(ResourceManager.Resource.LABORER, 1);
        }
    }
Example #6
0
 void DoUpdate()
 {
     if (Input.GetKey(KeyCode.L))
     {
         if (Input.GetKeyDown(KeyCode.U))
         {
             ResourceManager.AddResouce(ResourceManager.Resource.NANITEN, 500);
         }
         if (Input.GetKeyDown(KeyCode.I))
         {
             ResourceManager.AddResouce(ResourceManager.Resource.MATTER, 500);
         }
         if (Input.GetKeyDown(KeyCode.O))
         {
             ResourceManager.AddResouce(ResourceManager.Resource.ENERGY, 500);
             ResourceManager.AddResouce(ResourceManager.Resource.MAXENERGY, 500);
         }
         if (Input.GetKeyDown(KeyCode.P))
         {
             ResourceManager.AddResouce(ResourceManager.Resource.LABORER, 500);
         }
     }
     if (Input.GetKey(KeyCode.K))
     {
         if (Input.GetKeyDown(KeyCode.U))
         {
             ResourceManager.SubtractResouce(ResourceManager.Resource.NANITEN, 500);
         }
         if (Input.GetKeyDown(KeyCode.I))
         {
             ResourceManager.SubtractResouce(ResourceManager.Resource.MATTER, 500);
         }
         if (Input.GetKeyDown(KeyCode.O))
         {
             ResourceManager.SubtractResouce(ResourceManager.Resource.ENERGY, 500);
             ResourceManager.SubtractResouce(ResourceManager.Resource.MAXENERGY, 500);
         }
         if (Input.GetKeyDown(KeyCode.P))
         {
             ResourceManager.SubtractResouce(ResourceManager.Resource.LABORER, 500);
         }
     }
 }
Example #7
0
 public override void BuildFinished()
 {
     this.builded = true;
     ResourceManager.AddResouce(ResourceManager.Resource.ENERGY, CurrentEnergy);
     ResourceManager.AddResouce(ResourceManager.Resource.MAXENERGY, CurrentEnergy);
 }