public AreaManager(int areas_count, int single_size) { this.areas_count = areas_count; this.single_area_size = single_size; this.single_area_half_size = single_size / 2; this.total_area_number = areas_count * areas_count; this.center_area_index = (areas_count * areas_count - 1) / 2; MapSize = (float)(areas_count * single_size); areas = new List <Area>(); nearby_areas = new List <Area>(); lagged_areas = new List <Area>(); for (int posY = 0; posY < areas_count; posY++) { for (int posX = 0; posX < areas_count; posX++) { Area a = new Area(posX, posY); int id = id_map(posX, posY); a.init(id, index_to_pos(id)); LogicGameManager logicMgr = new LogicGameManager(id, a); a.regist_logic_mgr(logicMgr); areas.Add(a); } } //find_nearby_areas(0); }
public ConversionCommand(LogicGameManager logicGameManager, Block block, int targetEntityType) { m_logicGameManager = logicGameManager; m_block = block; m_targetEntityType = targetEntityType; m_originalEntityType = block.entityType; }
public void init(LogicGameManager manager, int id, Vector3 spawnPos) { this.id = id; this.game_manager = manager; //this.trans.localPosition = spawnPos; this.position = spawnPos; if (id == robotGame.player_id) { robotGame.BindPlayer(this); } //obj = Instantiate(player_prefab, spawnPos,Quaternion.identity); // todo: figure out the area id by spawnPos //area_manager.get_id_by_pos(this.trans.localPosition) }
private void Start() { gameConfig.Init(); m_levelManager = new LevelManager(); m_levelManager.Init(this); uiManager.Init(this); m_isInGame = false; m_isPause = false; m_logicGameManager = new LogicGameManager(this); m_presentationGameManager = new PresentationGameManager(this, m_logicGameManager); var stayChapterIndex = m_levelManager.GetStayChapterIndex(); uiManager.ShowPage <ChapterPage>(); if (stayChapterIndex >= 0) { var levelPage = uiManager.ShowPage <LevelPage>(); levelPage.SetContent(stayChapterIndex); } }
public EntityCategoryIsAttributeRule(LogicGameManager logicGameManager, EntityCategory entityCategory, AttributeCategory attributeCategory) { m_logicGameManager = logicGameManager; m_entityCategory = entityCategory; m_attributeCategory = attributeCategory; }
public void regist_logic_mgr(LogicGameManager logic_mgr) { this.logic_mgr = logic_mgr; }
public PresentationGameManager(GameManager gameManager, LogicGameManager logicGameManager) { m_gameManager = gameManager; m_logicGameManager = logicGameManager; }
public DestroyCommand(LogicGameManager logicGameManager, Block block) { m_logicGameManager = logicGameManager; m_block = block; }
public EntityTypeIsAttributeRule(LogicGameManager logicGameManager, int entityType, AttributeCategory attributeCategory) { m_logicGameManager = logicGameManager; m_entityType = entityType; m_attributeCategory = attributeCategory; }