void Awake() { meshRenderer = gameObject.GetComponent <MeshRenderer>(); resourcesScript = resources.GetComponent <ResourceManager>(); cameraFollow = Camera.main.gameObject.GetComponent <CameraFollow>(); actionProduction = gameObject.GetComponent <ActionProduction>(); actionCounter = gameObject.GetComponent <ActionCounter>(); undoController = GameObject.Find("/BottomPlane").GetComponent <UndoController>(); actionTitlePanel = GameObject.Find("/UI/ActionTitle/Panel").GetComponent <Image>(); actionTitleText = GameObject.Find("/UI/ActionTitle/Text").GetComponent <Text>(); actionSubTitleText = GameObject.Find("/UI/ActionTitle/SubText").GetComponent <Text>(); flashScript = gameObject.GetComponent <Flash>(); ToogleTitle(false); }
public DistrictRepo(ApplicationDbContext db, int districtId, int chunkSize = 50) { Db = db; DistrictId = districtId; ChunkSize = chunkSize; Committer = new ActionCounter(async() => { await db.SaveChangesAsync(); // clear local cache of objects district = null; currentHistory = null; }, chunkSize: ChunkSize); }
void Awake() { actionBase = gameObject.GetComponent <ActionBase>(); actionCounter = gameObject.GetComponent <ActionCounter>(); }
internal Player(string name) { Name = name; Hand = new Hand(this); ActionCounter = new ActionCounter(); }