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