/// <summary> /// constructor, passes parent for more functionality /// </summary> public PersonnelQueryForm(Main parent) { InitializeComponent(); this.parent = parent; Initialize(); }
public void ChangeState(Main.caveman_type nextState) { cave_give_state = nextState; Debug.Log(nextState); switch (cave_give_state) { case Main.caveman_type.black: sprite.color = Main.caveman_colors[0]; text.color = Color.white; break; case Main.caveman_type.red: sprite.color = Main.caveman_colors[1]; text.color = Color.black; break; case Main.caveman_type.green: sprite.color = Main.caveman_colors[2]; text.color = Color.black; break; case Main.caveman_type.white: sprite.color = Main.caveman_colors[3]; text.color = Color.black; break; } }
public GridViewBurn(Main main) { _main = main; // Setup message queue for receiving Messages IMessageQueue queueMessage = ServiceScope.Get<IMessageBroker>().GetOrCreate("message"); queueMessage.OnMessageReceive += OnMessageReceive; InitializeComponent(); _main.BurnButtonsEnabled = false; // Create the Temp Directory for the burner if (!Directory.Exists(tmpBurnDirectory)) Directory.CreateDirectory(tmpBurnDirectory); // Load the Settings gridColumns = new GridViewColumnsBurn(); dataGridViewBurn.AutoGenerateColumns = false; dataGridViewBurn.DataSource = bindingList; // Now Setup the columns, we want to display CreateColumns(); CreateContextMenu(); lbBurningStatus.Text = localisation.ToString("Burning", "DragAndDrop"); // "Use Drag & Drop to order the tracks for burning"; }
private static void LoadClientParameters(Main game) { string iP; if ((iP = LaunchInitializer.TryParameter(new string[] { "-j", "-join" })) != null) { game.AutoJoin(iP); } string serverPassword; if ((serverPassword = LaunchInitializer.TryParameter(new string[] { "-pass", "-password" })) != null) { Netplay.ServerPassword = serverPassword; game.AutoPass(); } if (LaunchInitializer.HasParameter(new string[] { "-host" })) { game.AutoHost(); } }
public AddMember(Main sender) { InitializeComponent(); parent = sender; }
void Awake() { main = FindObjectOfType<Main>(); targeter = FindObjectOfType<TapTarget>(); camAngle = 0f; physicsCtrlVec = Vector2.zero; }
public override bool Init(Main Main, System.Diagnostics.Stopwatch swInit) { if (!Main.EventMgr.PluginExists<Events.Screen>()) { this.Log.LogLine("Task \"LogScreenEvents\" is missing EventPlugin \"Screen\"!", Log.Type.Error); return false; } this.Main = Main; this.Log = Main.Log; swInit.Stop(); Events.Screen screenEvents = Main.EventMgr.GetPlugin<Events.Screen>(); swInit.Start(); screenEvents.ScreenAdded += new Events.EventPlugin.EventValue<ScreenEx>(screenEvents_ScreenAdded); screenEvents.ScreenRemoved += new Events.EventPlugin.EventValue<ScreenEx>(screenEvents_ScreenRemoved); screenEvents.ScreenColorDepthChanged += new Events.EventPlugin.EventValues<ScreenEx>(screenEvents_ScreenColorDepthChanged); screenEvents.ScreenResolutionChanged += new Events.EventPlugin.EventValues<ScreenEx>(screenEvents_ScreenResolutionChanged); screenEvents.PrimaryScreenChanged += new Events.EventPlugin.EventValues<ScreenEx>(screenEvents_PrimaryScreenChanged); screenEvents.ScreenLocationChanged += new Events.EventPlugin.EventValues<ScreenEx>(screenEvents_ScreenLocationChanged); screenEvents.ScreenOrientationChanged += new Events.EventPlugin.EventValues<ScreenEx>(screenEvents_ScreenOrientationChanged); screenEvents.ScreenRefreshRateChanged += new Events.EventPlugin.EventValues<ScreenEx>(screenEvents_ScreenRefreshRateChanged); return true; }
void Start() { guitext = "game over"; GameObject M = GameObject.Find("Main"); main = M.GetComponent<Main> (); UIBar (); }
public override void AttachEditorComponents(Entity result, Main main) { base.AttachEditorComponents(result, main); Model model = result.Get<Model>("EditorModel"); model.Add(new Binding<Vector3, string>(model.Color, x => string.IsNullOrEmpty(x) ? Vector3.One : new Vector3(1.0f, 0.0f, 0.0f), result.Get<Script>().Errors)); }
public override void Bind(Entity result, Main main, bool creating = false) { result.CannotSuspend = true; Script script = result.Get<Script>(); Property<bool> executeOnLoad = result.GetProperty<bool>("ExecuteOnLoad"); if (executeOnLoad && !main.EditorEnabled) { result.Add("Executor", new PostInitialization { delegate() { if (executeOnLoad) script.Execute.Execute(); } }); } Property<bool> deleteOnExecute = result.GetOrMakeProperty<bool>("DeleteOnExecute", true, false); if (deleteOnExecute) result.Add(new CommandBinding(script.Execute, result.Delete)); this.SetMain(result, main); }
/// <summary> /// Constructor, passes main form for more functionality /// </summary> public PersonnelEditForm(Main form) { InitializeComponent(); parent = form; Intialize(); }
// ******************************************** START/ UPDATE ******************************************** void Awake() { // find components: compoMain = Camera.main.GetComponent<Main>(); highscoreText = highscore.GetComponent<Text>(); nameText = name.GetComponent<Text>(); }
public GameObject CreateDecor(Main main) { GameObject parent = new GameObject ("Decor"); int count = UnityEngine.Random.Range(minCount, maxCount + 1); LocationTiles tempTiles = new LocationTiles (main.Tiles); for (int i = 0; i < count; i++) { Point<int> point = tempTiles.GetFreeRandomPoint (1, 1, 0, 0, 0); if (point == null) { Debug.Log("no more place for decor"); break; } Sprite sprite = Sprites[UnityEngine.Random.Range(0, Sprites.Length)]; GameObject decor = new GameObject("Decor " + sprite.name); float scale = main.SourceGraphicsScale; decor.AddComponent<SpriteRenderer>().sprite = sprite; decor.transform.SetParent(parent.transform, true); decor.transform.localScale = new Vector3(scale* (UnityEngine.Random.value > 0.5f ? 1 : -1), scale, 1); decor.transform.localPosition = new Vector3(point.x * main.TileSize + main.TileSize / 2, point.y * main.TileSize + main.TileSize / 2 + scale * sprite.bounds.size.y / 2, 0); decor.GetComponent<SpriteRenderer>().sortingOrder = LocationSortOrders.GetLocationObjectSortOrder(point.y * main.TileSize + main.TileSize / 2); tempTiles.Set(point.x, point.y, TileType.Forbidden); } return parent; }
public override bool Init(Main Main, System.Diagnostics.Stopwatch swInit) { if (!Main.EventMgr.PluginExists<Events.Power>()) { this.Log.LogLine("Task \"LogPowerEvents\" is missing EventPlugin \"Power\"!", Log.Type.Error); return false; } this.Main = Main; this.Log = Main.Log; swInit.Stop(); Events.Power pwrEvents = Main.EventMgr.GetPlugin<Events.Power>(new object[] {Main}, true); swInit.Start(); pwrEvents.PowerModeChanged += new Events.EventPlugin.EventValue<PowerModes>(pwrEvents_PowerModeChanged); pwrEvents.Suspend += new Events.EventPlugin.Event(pwrEvents_Suspend); pwrEvents.Resume += new Events.EventPlugin.Event(pwrEvents_Resume); pwrEvents.PowerLineStatusChanged += new Events.EventPlugin.EventValues<PowerLineStatus>(pwrEvents_PowerLineStatusChanged); pwrEvents.BatteryAvailabilityChanged += new Events.EventPlugin.EventValue<bool?>(pwrEvents_BatteryAvailabilityChanged); pwrEvents.BatteryStatusChanged += new Events.EventPlugin.EventValues<BatteryChargeStatus>(pwrEvents_BatteryStatusChanged); pwrEvents.PowerSchemeChanged += new Events.EventPlugin.EventValues<PowerScheme>(pwrEvents_PowerSchemeChanged); return true; }
/// <summary> /// Constructor, passes parent for more SQL and form transitions /// </summary> public HomeForm(Main parent) { InitializeComponent(); this.parent = parent; timer1.Start(); }
public AddItem(Main form) { InitializeComponent(); SetErrorProviders(); mainForm = form; }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Main game = new Main()) { game.Run(); } }
//private LeaveType _leaveType; //// //private Employee _employee; //private Manager _manager; //// public MainB() { _mainRep = new Main(); //_leaveType = new LeaveType(); //_employee = new Employee(); //_manager = new Manager(); }
public GlobalHotkey(int mod, Keys k, Main hw) { this.modifier = mod; this.key = (int)k; this.hWnd = hw.Handle; this.id = this.GetHashCode(); }
/// <summary> /// Form constructor. passes parent for extra functionality /// </summary> public IncidentQueryForm(Main parent) { InitializeComponent(); this.parent = parent; Initialize(); }
public override void Bind(Entity result, Main main, bool creating = false) { this.SetMain(result, main); Transform transform = result.Get<Transform>(); Sound sound = result.Get<Sound>("Sound"); sound.Add(new Binding<Vector3>(sound.Position, transform.Position)); result.CannotSuspendByDistance = !sound.Is3D; result.Add(new NotifyBinding(delegate() { result.CannotSuspendByDistance = !sound.Is3D; }, sound.Is3D)); Property<float> min = result.GetProperty<float>("MinimumInterval"); Property<float> max = result.GetProperty<float>("MaximumInterval"); Random random = new Random(); float interval = min + ((float)random.NextDouble() * (max - min)); result.Add(new Updater { delegate(float dt) { if (!sound.IsPlaying) interval -= dt; if (interval <= 0) { sound.Play.Execute(); interval = min + ((float)random.NextDouble() * (max - min)); } } }); }
public override Entity Create(Main main, int offsetX, int offsetY, int offsetZ) { Entity entity = base.Create(main, offsetX, offsetY, offsetZ); entity.Type = "VoxelFill"; entity.Create<VoxelFill>("VoxelFill").Enabled.Value = false; return entity; }
/// <summary> /// constructor. pass parent for SQL queries /// </summary> public ReportsForm(Main parent) { InitializeComponent(); Initialize(); this.parent = parent; }
public override Entity Create(Main main, int offsetX, int offsetY, int offsetZ) { Entity result = base.Create(main, offsetX, offsetY, offsetZ); result.Type = "FillMap"; result.ID = Entity.GenerateID(result, main); return result; }
public GridViewConvert(Main main) { _main = main; InitializeComponent(); // Listen to Messages // Setup message queue for receiving Messages IMessageQueue queueMessage = ServiceScope.Get<IMessageBroker>().GetOrCreate("message"); queueMessage.OnMessageReceive += OnMessageReceive; IMessageQueue queueMessageEncoding = ServiceScope.Get<IMessageBroker>().GetOrCreate("encoding"); queueMessageEncoding.OnMessageReceive += OnMessageReceiveEncoding; audioEncoder = ServiceScope.Get<IAudioEncoder>(); // Load the Settings gridColumns = new GridViewColumnsConvert(); dataGridViewConvert.AutoGenerateColumns = false; dataGridViewConvert.DataSource = bindingList; // Now Setup the columns, we want to display CreateColumns(); CreateContextMenu(); }
public override void Bind(Entity result, Main main, bool creating = false) { result.CannotSuspendByDistance = true; Transform transform = result.Get<Transform>(); DirectionalLight directionalLight = result.Get<DirectionalLight>(); this.SetMain(result, main); directionalLight.Add(new TwoWayBinding<Vector3, Matrix> ( directionalLight.Direction, delegate(Matrix x) { Vector3 y = Vector3.Normalize(-x.Forward); if (Vector3.Dot(y, directionalLight.Direction) > 0.0f) return y; return -y; }, transform.Orientation, delegate(Vector3 x) { Matrix matrix = Matrix.Identity; matrix.Forward = Vector3.Normalize(-x); matrix.Left = x.Equals(Vector3.Up) ? Vector3.Left : Vector3.Normalize(Vector3.Cross(x, Vector3.Up)); matrix.Up = Vector3.Normalize(Vector3.Cross(matrix.Left, matrix.Forward)); return matrix; } )); }
public MainScreen( Main.AddressBookViewModel addressBook, Func<Detail.PersonViewModel> makePersonDetail) { _addressBook = addressBook; _makePersonDetail = makePersonDetail; }
private void Awake() { PlayerData.instance.CheckInstance(); usableMaxPoint = PlayerData.instance.GetClearedStageCount(); if (usableMaxPoint > 12) // World2에선 StageClear해도 포인트 안 줌 usableMaxPoint = 12; usablePoint = usableMaxPoint; animator = GetComponent<Animator>(); main = GameObject.FindObjectOfType<Main>(); // 포인트 배분 로드하는 부분 구현 gaugeImages = new Image[upgradeButtons.Length, 6]; int alreadyAllocatedPoints = 0; for (int i = 0; i < upgradeButtons.Length; ++i) { allocatedPoints[i] = PlayerData.instance.upgradePoint[upgradeButtons[i].name]; alreadyAllocatedPoints += allocatedPoints[i]; for (int j = 0; j < 6; ++j) { gaugeImages[i, j] = upgradeButtons[i].transform.FindChild("Gauge" + (j + 1).ToString()).GetComponent<Image>(); } SetGauge(i, allocatedPoints[i]); } usablePoint -= alreadyAllocatedPoints; SetAllocateButtonInteractive(false); remainingPointText.text = usablePoint.ToString(); }
/// <summary> /// constructor. passes main form for more functionality /// </summary> public IncidentMap(Main form) { InitializeComponent(); parent = form; Initialize(); }
public SignAc(Main main, AUserModel userModel) { _Main = main; _UserModel = userModel; InitializeComponent(); }
public void SSJTransformation() { Projectile.NewProjectile(player.Center.X - 40, player.Center.Y + 70, 0, 0, mod.ProjectileType("SSJ1AuraProjStart"), 0, 0, player.whoAmI); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Awakening").WithVolume(1.5f)); }
///<summary>Spawn an object of this class</summary> public static MeshEditorSettings New(UObject obj = null, Name name = new Name()) => Main.NewObject(StaticClass, obj, name);
public override void ProcessTriggers(TriggersSet triggersSet) { if (Transform.JustPressed) { if (!player.HasBuff(mod.BuffType("SSJ1Buff")) && SSJ1Achieved && !IsTransforming) { player.AddBuff(mod.BuffType("SSJ1Buff"), 1800); Projectile.NewProjectile(player.Center.X - 40, player.Center.Y + 90, 0, 0, mod.ProjectileType("SSJ1AuraProjStart"), 0, 0, player.whoAmI); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/AuraStart").WithVolume(.7f)); } } if (SpeedToggle.JustPressed) { speedToggled = !speedToggled; } if (QuickKi.JustPressed) { } if (KaiokenKey.JustPressed && (!player.HasBuff(mod.BuffType("KaiokenBuff")) && !player.HasBuff(mod.BuffType("KaiokenBuffX3")) && !player.HasBuff(mod.BuffType("KaiokenBuffX10")) && !player.HasBuff(mod.BuffType("KaiokenBuffX20")) && !player.HasBuff(mod.BuffType("KaiokenBuffX100"))) && !player.HasBuff(mod.BuffType("TiredDebuff")) && !player.HasBuff(mod.BuffType("SSJ1Buff")) && KaioAchieved && !player.channel) { player.AddBuff(mod.BuffType("KaiokenBuff"), 18000); Projectile.NewProjectile(player.Center.X - 40, player.Center.Y + 90, 0, 0, mod.ProjectileType("KaiokenAuraProj"), 0, 0, player.whoAmI); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/KaioAuraStart").WithVolume(.5f)); } else if (KaiokenKey.JustPressed && (player.HasBuff(mod.BuffType("KaiokenBuff"))) && KaioFragment1) { player.ClearBuff(mod.BuffType("KaiokenBuff")); player.AddBuff(mod.BuffType("KaiokenBuffX3"), 18000); Projectile.NewProjectile(player.Center.X - 40, player.Center.Y + 90, 0, 0, mod.ProjectileType("KaiokenAuraProjx3"), 0, 0, player.whoAmI); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/KaioAuraAscend").WithVolume(.6f)); } else if (KaiokenKey.JustPressed && (player.HasBuff(mod.BuffType("KaiokenBuffX3"))) && KaioFragment2) { player.ClearBuff(mod.BuffType("KaiokenBuffX3")); player.AddBuff(mod.BuffType("KaiokenBuffX10"), 18000); Projectile.NewProjectile(player.Center.X - 40, player.Center.Y + 90, 0, 0, mod.ProjectileType("KaiokenAuraProjx10"), 0, 0, player.whoAmI); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/KaioAuraAscend").WithVolume(.6f)); } else if (KaiokenKey.JustPressed && (player.HasBuff(mod.BuffType("KaiokenBuffX10"))) && KaioFragment3) { player.ClearBuff(mod.BuffType("KaiokenBuffX10")); player.AddBuff(mod.BuffType("KaiokenBuffX20"), 18000); Projectile.NewProjectile(player.Center.X - 40, player.Center.Y + 90, 0, 0, mod.ProjectileType("KaiokenAuraProjx20"), 0, 0, player.whoAmI); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/KaioAuraAscend").WithVolume(.7f)); } else if (KaiokenKey.JustPressed && (player.HasBuff(mod.BuffType("KaiokenBuffX20"))) && KaioFragment4) { player.ClearBuff(mod.BuffType("KaiokenBuffX20")); player.AddBuff(mod.BuffType("KaiokenBuffX100"), 18000); Projectile.NewProjectile(player.Center.X - 40, player.Center.Y + 90, 0, 0, mod.ProjectileType("KaiokenAuraProjx100"), 0, 0, player.whoAmI); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/KaioAuraAscend").WithVolume(.8f)); } else if (KaiokenKey.JustPressed && (player.HasBuff(mod.BuffType("SSJ1Buff"))) && !player.HasBuff(mod.BuffType("SSJ1KaiokenBuff"))) { player.ClearBuff(mod.BuffType("KaiokenBuff")); player.ClearBuff(mod.BuffType("SSJ1Buff")); player.AddBuff(mod.BuffType("SSJ1KaiokenBuff"), 1800); Projectile.NewProjectile(player.Center.X - 40, player.Center.Y + 90, 0, 0, mod.ProjectileType("KaiokenAuraProj"), 0, 0, player.whoAmI); Projectile.NewProjectile(player.Center.X - 40, player.Center.Y + 90, 0, 0, mod.ProjectileType("SSJ1AuraProj"), 0, 0, player.whoAmI); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/KaioAuraAscend").WithVolume(.8f)); } if (EnergyCharge.Current && (KiCurrent < KiMax) && !player.channel) { KiCurrent += KiRegenRate; player.velocity = new Vector2(0, player.velocity.Y); ChargeSoundTimer++; if (ChargeSoundTimer > 22) { Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/EnergyCharge").WithVolume(.5f)); ChargeSoundTimer = 0; } } if (KiCurrent > KiMax) { KiCurrent = KiMax; } if (EnergyCharge.JustPressed) { if (!hasKaioken && !hasSSJ1) { Projectile.NewProjectile(player.Center.X - 40, player.Center.Y + 90, 0, 0, mod.ProjectileType("BaseAuraProj"), 0, 0, player.whoAmI); } Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/EnergyChargeStart").WithVolume(.7f)); } if (PowerDown.JustPressed && (player.HasBuff(mod.BuffType("KaiokenBuff")) || player.HasBuff(mod.BuffType("KaiokenBuffX3")) || player.HasBuff(mod.BuffType("KaiokenBuffX10")) || player.HasBuff(mod.BuffType("KaiokenBuffX20")) || player.HasBuff(mod.BuffType("KaiokenBuffX100")))) { player.ClearBuff(mod.BuffType("KaiokenBuff")); player.ClearBuff(mod.BuffType("KaiokenBuffX3")); player.ClearBuff(mod.BuffType("KaiokenBuffX10")); player.ClearBuff(mod.BuffType("KaiokenBuffX20")); player.ClearBuff(mod.BuffType("KaiokenBuffX100")); player.AddBuff(mod.BuffType("TiredDebuff"), 3600); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/PowerDown").WithVolume(.3f)); } if (PowerDown.JustPressed && (player.HasBuff(mod.BuffType("SSJ1Buff")))) { player.ClearBuff(mod.BuffType("SSJ1Buff")); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/PowerDown").WithVolume(.3f)); IsTransformed = false; } }
static MeshEditorSettings() { StaticClass = Main.GetClass("MeshEditorSettings"); }