void Awake() { m_collectibleManagerComponent = m_collectibleManager.GetComponent <CollectibleManager>(); m_platformsManagerComponent = m_platformsManager.GetComponent <PlatformsManager>(); m_ringManagerComponent = m_ring.GetComponent <RingManager>(); m_forceUpdateLevel = false; }
private static void OnLeaveLocationPostfix(Ring __instance, Farmer who, GameLocation environment) { if (RingManager.IsCosmeticRing(__instance.Name)) { RingManager.HandleLeaveLocation(who, environment, __instance); } }
// Start is called before the first frame update void Start() { playerAnimator = GameObject.Find("Player").GetComponent <Animator>(); //Refrence to SpawnManager script in the empty SpawnManager game object ringManager = GameObject.Find("Ring").GetComponent <RingManager>(); }
void Awake() { m_collectibleManagerComponent = m_collectibleManager.GetComponent<CollectibleManager>(); m_platformsManagerComponent = m_platformsManager.GetComponent<PlatformsManager>(); m_ringManagerComponent = m_ring.GetComponent<RingManager>(); m_forceUpdateLevel = false; }
private void OnOneSecondUpdateTicked(object sender, OneSecondUpdateTickedEventArgs e) { if (RingManager.HasCosmeticRingEquipped(Game1.player)) { RingManager.UpdateRingEffects(Game1.player, Game1.currentLocation); } }
private static void OnNewLocationPostfix(Ring __instance, Farmer who, GameLocation environment) { if (RingManager.IsSummoningRing(__instance)) { RingManager.HandleNewLocation(who, environment, __instance); } }
private static void OnEquipPostfix(Ring __instance, Farmer who, GameLocation location) { if (RingManager.IsSummoningRing(__instance)) { RingManager.HandleEquip(who, location, __instance); } }
private static void OnUnequipPostfix(Ring __instance, Farmer who, GameLocation location) { if (RingManager.IsCosmeticRing(__instance.Name)) { RingManager.HandleUnequip(who, location, __instance); } }
// Use this for initialization void Start() { delay = 4.5f; startTime = Time.time; lastCreation = startTime; lastFrequency = startTime; ringMan = GameObject.FindGameObjectWithTag("RingManager").GetComponent <RingManager>(); }
// Start is called before the first frame update void Start() { //Reference ringManager script ringManager = GameObject.Find("Ring").GetComponent <RingManager>(); //Start the timer at 0 currentTime = startingTime; }
// Update is called once per frame void Update() { this.transform.rotation = Quaternion.Slerp(transform.rotation, RingManager.GetRingQuat(), 0.1f); if (RingManager.GetRingTouching()) { Debug.Log("Touch!!!"); } }
// Start is called before the first frame update void Start() { //Get refs for game start/end, and time. ringManager = GameObject.Find("Ring").GetComponent <RingManager>(); //timercontroller = GameObject.Find("Timer").GetComponent<TimerController>(); //CHRIS'S CODE InvokeRepeating("SpawnRandomAnimal", spawnDelay, spawnDelay); }
// Start is called before the first frame update void Start() { //Get ringManager ringManager = GameObject.Find("Ring").GetComponent <RingManager>(); //timerController = GameObject.Find("Timer").GetComponent<TimerController>(); //Set the objective text objectiveTextString = "Step into the Ring to begin the game."; objectiveText.text = objectiveTextString; }
private void Awake() { gameSettings = FindObjectOfType <GameSettings>(); ringManager = FindObjectOfType <RingManager>(); animator = comboCounterUI.GetComponent <Animator>(); audioSource = GetComponent <AudioSource>(); comboCounterUI.text = "0x"; scorePercentageUI.text = "100%"; }
private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(this); } }
void Start() { player = GameObject.FindGameObjectWithTag("Player"); ringMan = GameObject.FindGameObjectWithTag("RingManager").GetComponent <RingManager>(); radiusIncrement = ringMan.ringBuffer / 2; minRadius = ringMan.getMinRadius(); maxRadius = ringMan.getMaxRadius(); center = ringMan.center; resources = 0; startTime = Time.time; resources = startingResources; }
private void DebugReload(string command, string[] args) { this.RemoveAllCompanions(); this.LoadContentPacks(true); // Respawn any previously active companions RingManager.LoadWornRings(); this.SpawnSceneryCompanions(Game1.player.currentLocation); // Remove companions that no longer have an existing map tile property this.RemoveOrphanCompanions(Game1.player.currentLocation); }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
private void OnDayStarted(object sender, EventArgs e) { RingManager.LoadWornRings(); // Clear out the list of denied companions to respawn CompanionManager.denyRespawnCompanions = new List <SceneryCompanions>(); // Spawn any required companions foreach (var location in Game1.locations) { this.SpawnSceneryCompanions(location, spawnOnlyRequiredCompanions: true); } }
// Update is called once per frame void Update() { if (RingManager.DidReceiveNewGesture()) { string gestureName = RingManager.GetReceiveGestureName(); Debug.Log("GestureReceived!!" + gestureName); ResultGestureDisplay.text = "GestureReceived!! " + gestureName; if (gestureName.Equals("CIRCLE")) { //your code } else if (gestureName.Equals("TRIANGLE")) { //your code } else if (gestureName.Equals("HEART")) { //your code } else if (gestureName.Equals(@"PIGTALE")) { //your code } else if (gestureName.Equals("UP")) { //your code } else if (gestureName.Equals("DOWN")) { //your code } else if (gestureName.Equals("LEFT")) { //your code } else if (gestureName.Equals("RIGHT")) { //your code } else { ResultGestureDisplay.text = "Gesture NOTFOUND!"; } } if (RingManager.GetRingTouching()) { Debug.Log("Touch!!!"); } }
private void OnSaveLoaded(object sender, SaveLoadedEventArgs e) { if (wearMoreRingsApi != null) { RingManager.LoadWornRings(Game1.player, Game1.currentLocation, wearMoreRingsApi.GetAllRings(Game1.player)); } else { RingManager.LoadWornRings(Game1.player, Game1.currentLocation, new List <Ring>() { Game1.player.leftRing, Game1.player.rightRing }); } }
private void AudioCallBlockLoaded(object sender, RoutedEventArgs e) { _audioCallViewModel = ((CallViewModel) DataContext).Audio; _audioCallViewModel.MicrophoneIsNotAvailable += MicrophoneIsNotAvailableHandler; _audioCallViewModel.PropertyChanged += PropertyChangedHandler; _ringManager = new RingManager(RingPlayer); _ringManager.RegisterEventHandlers(_audioCallViewModel); var state = (string) new CallStateToStringConverter().Convert(_audioCallViewModel.State, typeof (string), null, null); VisualStateManager.GoToState(this, state, false); }
private void AudioCallBlockLoaded(object sender, RoutedEventArgs e) { _audioCallViewModel = ((CallViewModel)DataContext).Audio; _audioCallViewModel.MicrophoneIsNotAvailable += MicrophoneIsNotAvailableHandler; _audioCallViewModel.PropertyChanged += PropertyChangedHandler; _ringManager = new RingManager(RingPlayer); _ringManager.RegisterEventHandlers(_audioCallViewModel); var state = (string) new CallStateToStringConverter().Convert(_audioCallViewModel.State, typeof(string), null, null); VisualStateManager.GoToState(this, state, false); }
private void Awake() { if (this.mat == null) { this.mat = this.GetComponent <Material>(); } if (this.ringManager == null) { this.ringManager = this.GetComponentInChildren <RingManager>(); } if (this.initalScale == null) { this.initalScale = this.transform.localScale; } }
// Use this for initialization void Start() { MyInstance = this; if (Application.platform != RuntimePlatform.OSXEditor) { _StartRing(); RingStartFlg = true; Debug.Log("RingInitialize : Start"); if (RingMode == RingModeType.QuaternionMode) { _QuaternionMode(); Debug.Log("QuaternionMode"); } } }
private void Awake() { if (_instance == null) { _instance = this; } _player = FindObjectOfType <Player>(); for (var i = 0; i < _numberOfRings; i++) { var ringPositionCount = _ringPositions - _ringPositionCountModifier * i; var radius = _innerRadius + i * _innerRadius * _ringRadiusModifier; var positionsOnRing = new List <RingPosition>(); for (var j = 0; j < ringPositionCount; j++) { var angle = j * Mathf.PI * 2 / ringPositionCount; var ringPositionObject = Instantiate(_ringPositionPrefab, _player.transform, true); ringPositionObject.name = $"{j + 1} Ring Position - {i}"; ringPositionObject.InitializePositionValues(angle, radius, i); positionsOnRing.Add(ringPositionObject); _allPositions.Add(ringPositionObject); } _ringOrders.Add(i, positionsOnRing); _ringPositionQueues[i] = PopulateQueue(i, _ringOrders[i]); } foreach (var ringPosition in _allPositions) { ringPosition.SetRingNode(); } }
void Start() { ringMan = transform.parent.GetComponent <RingManager>(); }
void OnTriggerEnter(Collider col) { if (col.gameObject.tag == "Rail") { player_rigidbody.velocity = Vector3.zero; jump_counter = 0; //Start the grinding statement in the FixedUpdate() grinding = true; //Stop the player from falling when on rail SetPlayerKinematic(true); ResetDashValues(); //Will determine what direction the player will go towards if (Mathf.Abs(col.transform.eulerAngles.y - transform.eulerAngles.y) < 90f) { transform.rotation = Quaternion.Euler(new Vector3(0, col.transform.eulerAngles.y, 0)); grinding_direction = col.transform.forward; } else { transform.rotation = Quaternion.Euler(new Vector3(0, col.transform.eulerAngles.y + 180f, 0)); grinding_direction = -col.transform.forward; } } if (col.gameObject.tag == "Launch Ring") { in_ring = true; //Used to calculate direction Vector3 forward = transform.TransformDirection(Vector3.forward); //Used to compare directions Vector3 to_other = col.transform.up - transform.position; ring_manager_script = col.transform.parent.transform.parent.GetComponent <RingManager>(); ring_manager_script.engage_transit = true; //get col.gameObject name string col_name = col.transform.parent.name; //get last character of col.gameObject.name, its a number //the rings are automatically named in RingManager.cs string last_character = col_name.Substring(col_name.Length - 1); ring_manager_script.counter = Convert.ToInt32(last_character); if (ring_manager_script.counter == 0) { allow_gamepad_player_movement = false; } if (ring_manager_script.counter < ring_manager_script.child_count - 1) { ring_manager_script.counter++; ring_manager_script.engage_transit = true; } else { ring_manager_script.counter++; ring_manager_script.engage_transit = false; } //this is executed when the player reaches the final ring, to push the player our a bit if (ring_manager_script.counter == ring_manager_script.child_count) { //Enables player movement with left joystick allow_gamepad_player_movement = true; //Aligns the player's rotation with the ring transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.Euler(transform.rotation.eulerAngles.x, col.transform.eulerAngles.z, transform.rotation.eulerAngles.z), 1.0f); ring_direction = col.transform.up; input_direction = ring_direction; StartCoroutine(MoveFor(4.0f)); StartCoroutine(DisableGravityForRing()); exiting_ring = true; } } if (col.gameObject.tag == "Launch Pad") { //simple addforce jumper for launch pad GetComponent <Rigidbody>().AddForce(col.gameObject.transform.forward * 500000 * booster_force * Time.deltaTime, ForceMode.Impulse); //to NOT allow player to jump after hitting launch pad jump_counter++; } }
void Start() { ringMan = GameObject.FindGameObjectWithTag("RingManager").GetComponent <RingManager>(); }
public static void Init(GameObject prefab, RingManager manager) { Ring.prefab = prefab; Ring.manager = manager; }
// Start is called before the first frame update void Awake() { instance = this; }
void Awake() { instance = this; my_audio = GetComponent <AudioSource> (); }