void Start() { if (gameObject.name == "Build Point") { Instantiate(middleChoice, gameObject.transform.position, Quaternion.identity); } else { WeaponFSM weaponFSM = gameObject.GetComponent <WeaponFSM>(); setVals(weaponFSM.range, weaponFSM.cost); } }
private float fireRateEndCheckRatio = 0.75f; // At what percent of time do we check for end fire transitions #endregion // Use this for initialization public virtual void Start() { tag = "Weapon"; // Initialize our state machine primaryFireFSM = new WeaponFSM("FSM_PRIMARYFIRE", this); // CJS - Logging player activity only now. // Useful for displaying only one FSM's state. /*#if UNITY_EDITOR * if (weaponOwner && weaponOwner.CompareTag("Player")) * primaryFireFSM.LogThis = true; #endif*/ // Start the first idling primaryFireFSM.Start(EWeaponState.IDLE); // Initialize our audio components if (!BaseAudioProperties.FireNoiseSource) { BaseAudioProperties.FireNoiseSource = gameObject.AddComponent <AudioSource>(); } }
public CooldownState(WeaponFSM parent, EWeaponState ID, string prettyID, BaseWeapon weapon) : base(parent, ID, prettyID, weapon) { }