public DoJobState(GridActor actor, IGenericSaveData save, LilLogger logger) : base(((SaveData)save).parent) { this.actor = actor; this.logger = logger; this.work = LoadWork(((SaveData)save).workSave); logger.Log("Loading my DoJobState"); }
public DorfController(String name, GridActor actor, LilLogger logger) { this.name = name; this.gridActor = actor; this.logger = logger; stateMachine = new StateMachine(new ChoosingJobState(gridActor, logger)); }
public MiningJob(GridActor actor, MiningRequest request, LilLogger logger) { Debug.Assert(request != null); this.logger = logger; Debug.Log("Started a mining job"); machine = new StateMachine(new WalkToBlockState(actor, request, logger)); }
public MineBlockState(GridActor user, MiningRequest request, LilLogger logger) { this.user = user; this.request = request; this.logger = logger; logger.Log("Entering MineBlockState with request " + request); }
public DoJobState(IJob work, GridActor actor, LilLogger logger) { this.actor = actor; this.logger = logger; this.work = work; logger.Log("Initializing my DoJobState"); }
public FindItemState(GridActor actor, MoveItemRequest request, LilLogger logger) { this.actor = actor; this.request = request; this.logger = logger; logger.Log("Initialized my FindItemState with request " + request); }
public WalkToBlockState(GridActor user, MiningRequest request, LilLogger logger) : base(user, 100, 1) { this.request = request; this.logger = logger; logger.Log("Initialized a WalkToBlockState with request " + request); Debug.Assert(this.request != null); }
public MineBlockState(GridActor user, IGenericSaveData saveData, LilLogger logger) : base(((SaveData)saveData).parent) { this.user = user; SaveData save = saveData as SaveData; this.request = save.request; logger.Log("Loading MineBlockState with request " + request); }
public WalkToTargetState(GridActor actor, MoveItemRequest request, Item item, LilLogger logger) : base(actor, 100, 1) { this.actor = actor; this.request = request; this.item = item; this.logger = logger; logger.Log("Initialized my WalkToTargetState with request " + request); }
public WalkToItemState(GridActor actor, MoveItemRequest request, Vector3Int target, LilLogger logger) : base(actor, 100) { this.actor = actor; this.request = request; this.target = target; this.logger = logger; logger.Log("Initialized my WalkToItemState with request " + request); }
public WalkRandomlyJob(GridActor user, LilLogger logger) { this.logger = logger; logger.Log("Starting a WalkRandomlyJob"); Vector3Int size = SingletonProvider.MainGridMap.GetSize(); machine = new StateMachine(new WalkRandomlyState(user, logger)); }
public WalkToBlockState(GridActor user, IGenericSaveData saveData, LilLogger logger) : base(user, ((SaveData)saveData).parent) { this.logger = logger; SaveData save = saveData as SaveData; this.request = save.request; logger.Log("Loaded a WalkToBlockState with request " + request); Debug.Assert(this.request != null); }
public FindItemState(GridActor actor, IGenericSaveData saveData, LilLogger logger) : base(((SaveData)saveData).parent) { this.actor = actor; this.logger = logger; SaveData save = saveData as SaveData; this.request = save.request; logger.Log("Loaded my FindItemState with request " + request); }
public MiningJob(GridActor actor, IGenericSaveData save, LilLogger logger) { this.logger = logger; SaveData saveData = (SaveData)save; if (saveData.activeState != null) { machine = new StateMachine(LoadState(actor, saveData.activeState)); } }
public WalkToTargetState(GridActor actor, IGenericSaveData saveData, LilLogger logger) : base(actor, ((SaveData)saveData).parent) { this.actor = actor; this.logger = logger; SaveData save = saveData as SaveData; this.request = save.request; this.item = save.item; logger.Log("Loaded my WalkToTargetState with request " + request); }
public DorfController(IGenericSaveData data, GridActor actor, LilLogger logger) { SaveData save = (SaveData)data; name = save.name; this.logger = logger; logger.Log("I'm being loaded"); this.gridActor = actor; this.stateMachine = new StateMachine(LoadState(save.currentStateSave)); }
public static T GetComponent <T>(GameObject g, LilLogger logger) { T comp = g.GetComponent <T>(); if (comp == null) { logger.Log("Component " + typeof(T).ToString() + "not found on gameobject " + g.name, LogLevel.Warning); } return(comp); }
private void Start() { if (logger == null) { logger = new LilLogger(gameObject.name); } gridActor = GetComponent <GridActor>(); controller = new DorfController(gameObject.name, gridActor, logger); logger.Log("I started"); }
public WalkRandomlyJob(GridActor user, IGenericSaveData save, LilLogger logger) { this.logger = logger; SaveData saveData = (SaveData)save; logger.Log("Loading a WalkRandomlyJob"); if (saveData.activeState != null) { machine = new StateMachine(LoadState(user, saveData.activeState)); } }
void Start() { logger = new LilLogger(typeof(UnbuiltBuildingGhoster).ToString()); observer = new SimpleObserver <PlayerUpdateEvent>(PlayerComponent.Instance, OnPlayerSettingsUpdated); filter = GetComponent <MeshFilter>(); meshRenderer = GetComponent <MeshRenderer>(); seeThroughShader = PrefabLoader.GetPrefab <Shader>("Shaders/SeeThroughShader"); if (seeThroughShader == null) { logger.Log("Unable to load Shaders/SeeThroughShader", LogLevel.Warning); } }
void Start() { logger = new LilLogger(gameObject.name); visualizer = GetComponent <BlockVisualizer>(); if (visualizer) { visualizer.RenderBlock(plannedBlock); } else { logger.Log("No BlockVisualizer found on BlockBuildGhoster", LogLevel.Warning); } oldMousePos = Input.mousePosition; }
public MoveItemJob(GridActor actor, MoveItemRequest request, LilLogger logger) { this.logger = logger; logger.Log("Started a MoveItemJob"); machine = new StateMachine(new FindItemState(actor, request, logger)); }
public ChoosingJobState(GridActor actor, LilLogger logger) { this.actor = actor; this.logger = logger; }
public WalkRandomlyState(GridActor user, LilLogger logger) { this.logger = logger; this.user = user; logger.Log("Initialized a WalkRandomlyState"); }
public ChoosingJobState(GridActor actor, IGenericSaveData save, LilLogger logger) : base(((SaveData)save).parent) { this.actor = actor; this.logger = logger; }
public WaitState(LilLogger logger) : base(1000) { this.logger = logger; logger.Log("Starting my WaitState"); }
public WalkRandomlyState(GridActor user, IGenericSaveData save, LilLogger logger) : base(save) { this.logger = logger; this.user = user; }