private float ComputeRotateAmount(GamePadThumbSticks.StickValue _gamePadRightThumbStickValue, List <Collider> _collidersInside) { float returnRotateAmount = 0; if (Mathf.Abs(_gamePadRightThumbStickValue.X) > .4) { returnRotateAmount += _gamePadRightThumbStickValue.X * 50.0f; } foreach (Collider col in _collidersInside) { string collObjTag = col.gameObject.tag; if (collObjTag == "Hazard") { HazardStore hazStore = col.gameObject.GetComponent <HazardStore> (); if (hazStore.GetType().ToString() == "Rotator_HazardStore") { returnRotateAmount += ((Rotator_HazardStore)hazStore).rotateEffect; } } } return(returnRotateAmount); }
void Awake() { hazardStore = GetComponent <HazardStore> (); hazardActionCreator = GetComponent <HazardActionCreator> (); }
void Awake() { hazardStore = GetComponent <HazardStore> (); }