public override void _Ready() { _animationTree = GetNode <AnimationTree>("AnimationTree"); _shootAnimation = GetNode <AnimationPlayer>("ShootAnimation"); _model = GetNode <Spatial>("RedRobotModel"); _rayFrom = _model.GetNode <BoneAttachment>(@"Armature/Skeleton/RayFrom"); _rayMesh = _rayFrom.GetNode <MeshInstance>(@"RayMesh"); _explosionParticles = _rayFrom.GetNode <CPUParticles>(@"ExplosionParticles"); _explosionSound = GetNode <AudioStreamPlayer3D>("SoundEffects/Explosion"); _hitSound = GetNode <AudioStreamPlayer3D>("SoundEffects/Hit"); _death = GetNode <Spatial>("Death"); _shield1 = _death.GetNode <RigidBody>(@"PartShield1"); _shield2 = _death.GetNode <RigidBody>(@"PartShield2"); _shield3 = _death.GetNode <RigidBody>(@"PartShield3"); _gravity = Convert.ToSingle(ProjectSettings.GetSetting("physics/3d/default_gravity")) * (Vector3)ProjectSettings.GetSetting("physics/3d/default_gravity_vector"); _orientation = GlobalTransform; _orientation.origin = new Vector3(); }
public override void _Ready() { weaponAttatch = GetNode <BoneAttachment>(WeaponAttatchPath); }