Inheritance: MonoBehaviour
Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 void Awake()
 {
     actionBase    = gameObject.GetComponent <ActionBase>();
     actionCounter = gameObject.GetComponent <ActionCounter>();
 }
Ejemplo n.º 4
0
 internal Player(string name)
 {
     Name = name;
     Hand = new Hand(this);
     ActionCounter = new ActionCounter();
 }