Esempio n. 1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Esempio n. 2
0
    override public void init()
    {
        base.init();

        //CGame.inst ().setPlayer (mPlayer);

        mEnemyManager   = new CEnemyManager();
        mItemManager    = new CItemManager();
        mBulletManager  = new CBulletManager();
        mParticleManger = new CParticleManager();
        mTierra         = new Tierra();


        // El mapa crea enemigos. Crear los managers antes que el mapa.
        mMap = new CTileMap();
        CGame.inst().setMap(mMap);



        mAndy = new CAndy();
        mAndy.setXY(400, 400);

        //createAsteroids ();

        /*CEnemyShip e = new CEnemyShip ();
         * e.setXY (200, 200);
         * CEnemyManager.inst ().add (e);*/
    }
Esempio n. 3
0
    override public void destroy()
    {
        base.destroy();

        mMap.destroy();
        mMap = null;

        mAndy.destroy();
        mAndy = null;

        mEnemyManager.destroy();
        mEnemyManager = null;

        mItemManager.destroy();
        mItemManager = null;

        mBulletManager.destroy();
        mBulletManager = null;

        mParticleManger.destroy();
        mParticleManger = null;


        mTierra.destroy();
        mTierra = null;
    }
    override public void init()
    {
        base.init();

        //CGame.inst ().setPlayer (mPlayer);

        mEnemyManager   = new CEnemyManager();
        mItemManager    = new CItemManager();
        mBulletManager  = new CBulletManager();
        mParticleManger = new CParticleManager();


        // El mapa crea enemigos. Crear los managers antes que el mapa.
        mMap = new CTileMap("Assets/Resources/Map/Map.tmx");
        CGame.inst().setMap(mMap);

        mAndy         = new CAndy();
        mAndy.muestro = mMap;
        mAndy.setXY(400, 400);
        mAndy.setCheckpoint(400, 400);
        CGame.inst().setPlayer(mAndy);

        mBackground = new CSprite();
        mBackground.setImage(Resources.Load <Sprite>("Sprites/background/background"));
        mBackground.setName("Background");
        mBackground.setRegistration(CSprite.REG_CENTER);
        mBackground.setParent(CCamera.inst().getTransform());

        CCamera.inst().setSize(mMap.getTileHeight() * 8);
        CCamera.inst().setBounds(0, 0, mMap.getMapWidth() * mMap.getTileWidth(), mMap.getMapHeight() * mMap.getTileHeight());
    }
Esempio n. 5
0
    private void loadEnemies(int aLevel)
    {
        ///Cargo el Niveles
        if (aLevel == 1)
        {
            CScorpion s = new CScorpion(CScorpion.TYPE_DONT_FALL);
            s.setXY(550, 300);
            CEnemyManager.inst().add(s);

            CItem item = new CItem(CItem.TYPE_DONT_FALL);
            item.setXY(700, 300);
            CItemManager.inst().add(item);

            CCoin coin = new CCoin(CCoin.TYPE_FALL);
            coin.setXY(800, 200);
            CItemManager.inst().add(coin);
        }
        else if (aLevel == 2)
        {
            CScorpion s = new CScorpion(CScorpion.TYPE_FALL);
            s.setXY(700, 300);
            CEnemyManager.inst().add(s);

            CItem item = new CItem(CItem.TYPE_DONT_FALL);
            item.setXY(400, 300);
            CItemManager.inst().add(item);

            CCoin coin = new CCoin(CCoin.TYPE_FALL);
            coin.setXY(550, 200);
            CItemManager.inst().add(coin);
        }
    }
Esempio n. 6
0
 public EditPersonForm(ref CAimManager _aimManager, ref CItemManager _itemManager, ref CPersonManager _personManager)
 {
     InitializeComponent();
     editedPerson = new CPerson();
     aimManager = _aimManager;
     itemManager = _itemManager;
     personManager = _personManager;
     fillUIComponents();
 }
Esempio n. 7
0
 public EditPersonForm(ref CAimManager _aimManager, ref CItemManager _itemManager, ref CPersonManager _personManager)
 {
     InitializeComponent();
     editedPerson  = new CPerson();
     aimManager    = _aimManager;
     itemManager   = _itemManager;
     personManager = _personManager;
     fillUIComponents();
 }
Esempio n. 8
0
 public EditPersonForm(CPerson _person, ref CAimManager _aimManager, ref CItemManager _itemManager, ref CPersonManager _personManager)
 {
     InitializeComponent();
     editedPerson = _person;
     aimManager = _aimManager;
     itemManager = _itemManager;
     personManager = _personManager;
     fillUIComponents();
     fillPersonData();
 }
Esempio n. 9
0
 public EditPersonForm(CPerson _person, ref CAimManager _aimManager, ref CItemManager _itemManager, ref CPersonManager _personManager)
 {
     InitializeComponent();
     editedPerson  = _person;
     aimManager    = _aimManager;
     itemManager   = _itemManager;
     personManager = _personManager;
     fillUIComponents();
     fillPersonData();
 }
Esempio n. 10
0
 private void registerSingleton()
 {
     if (mInst == null)
     {
         mInst = this;
     }
     else
     {
         throw new UnityException("ERROR: Cannot create another instance of singleton class CItemManager.");
     }
 }
Esempio n. 11
0
 public PrintResultForm(CPersonManager _personManager, CAimManager _aimManager, CItemManager _itemManager, CPrehistory _prehistory, CRules _rules)
 {
     InitializeComponent();
     personManager = _personManager;
     aimManager    = _aimManager;
     itemManager   = _itemManager;
     prehistory    = _prehistory;
     rules         = _rules;
     fillUIComponents();
     // remove then
     ddlPersonChoose.SelectedValue = 4;
 }
Esempio n. 12
0
 public PrintResultForm(CPersonManager _personManager, CAimManager _aimManager, CItemManager _itemManager, CPrehistory _prehistory, CRules _rules)
 {
     InitializeComponent();
     personManager = _personManager;
     aimManager = _aimManager;
     itemManager = _itemManager;
     prehistory = _prehistory;
     rules = _rules;
     fillUIComponents();
     // remove then
     ddlPersonChoose.SelectedValue = 4;
 }
    public override void Awake()
    {
        base.Awake();

        //this.SetupUICamera();
        //this.SetupMainCamera();
        CResourceManager.Create();
        CSoundManager.Create();
        CPopupManager.Create();
        CEffectManager.Create();
        CWeaponManager.Create();
        CItemManager.Create();
        CEnemyManager.Create();
        CStageManager.Create();
        CMerchandiseManager.Create();
        //에너미패턴 매니저의 경우 로비씬에서 크리에이트 해야 된다. 지금은 테스트용이라 여기에 해놈
        CEnemyPatternManager.Create();
        //CLocalizeManager.Instance.ResetDict();
        //CLocalizeManager.Instance.LoadStringListFromFile();

        Application.targetFrameRate = 60;

        Screen.SetResolution(KDefine.SCREEN_WIDTH, KDefine.SCREEN_HEIGHT, true);
    }
Esempio n. 14
0
 override public void destroy()
 {
     base.destroy();
     mInst = null;
 }