protected virtual void Start() { robotController = GetComponent <RobotController>(); robotCharacter = GetComponent <RobotCharacter>(); robotWeapon = GetComponent <RobotWeapon>(); robotMovement = GetComponent <RobotMovement>(); }
private void Start() { // Get the transform of the main camera to allow for camera-relative controls if (Camera.main != null) { cam = Camera.main.transform; } else { Debug.LogWarning( "Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls."); } // Initialize variables character = GetComponent<RobotCharacter>(); ragdoll = GetComponent<RobotRagdoll>(); particle = GetComponent<RobotParticleManager>(); energy = GetComponent<RobotEnergy>(); isoCam = Camera.main.GetComponent<IsometricCamera>(); GM = GameObject.Find("GameManager").GetComponent<GameManager>(); gui = GameObject.Find ("GUI").GetComponentInChildren<GUIManager>(); entity = GetComponentInChildren<EntityRig>(); crouch = false; guard = false; leftTriggerReleased = true; rightTriggerReleased = true; energy.StartEnergyDrain(); }
private void Awake() { robotController = GetComponent <RobotController>(); robotCharacter = GetComponent <RobotCharacter>(); collider2D = GetComponent <Collider2D>(); spriteRenderer = GetComponent <SpriteRenderer>(); CurrentHealth = initialHealth; }
void Start () { anim = GetComponent<Animator>(); character = GetComponent<RobotCharacter>(); // Find all particle systems attached to player leftThrusterPS = GameObject.Find ("LeftThrusterPS"); rightThrusterPS = GameObject.Find ("RightThrusterPS"); shieldWavePS = GameObject.Find ("ShieldWavePS"); dashBangPS = GameObject.Find ("DashBangPS"); dashingSmokePS = GameObject.Find ("DashingSmokePS"); landingSmokePS = GameObject.Find ("LandingSmokePS"); wallCrashPS = GameObject.Find ("WallCrashPS"); sizeChangePS = GameObject.Find ("SizeChangeAuraPS"); }
private void Start() { // Get the transform of the main camera to allow for camera-relative controls if (Camera.main != null) { cam = Camera.main.transform; } else { Debug.LogWarning( "Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls."); } // Initialize variables character = GetComponent<RobotCharacter>(); ragdoll = GetComponent<RobotRagdoll>(); isoCam = Camera.main.GetComponent<IsometricCamera>(); crouch = false; guard = false; leftTriggerReleased = true; rightTriggerReleased = true; }
public void SetOwner(RobotCharacter owner) { WeaponOwner = owner; controller = WeaponOwner.GetComponent <RobotController>(); }