Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7993079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:44:44+00:00 2026-06-04T13:44:44+00:00

At the moment I am trying to use an integer to declare whether or

  • 0

At the moment I am trying to use an integer to declare whether or not a setting is enabled or disabled, the issue that I am facing is trying to use the variable in another class so as that I can transfer the setting to be used in the actual game. My question is how can I do this? If you have an answer could you also give an example of how this would be implemented.

Thanks for your time,

Christian

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:44:46+00:00Added an answer on June 4, 2026 at 1:44 pm

    Playing off of what Morion said, take a look at these: Singletons

    They are good for things like this. They will allow you to create a “global class” from which you can access variables like this: [[MySingleton instance] myVariable]; from anywhere in your game. The link will explain how to set one up.

    Singletons are probably a bit more organized and easy to use, but Morion’s way is most likely faster.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to write a code at the moment that basically tests to see if
At the moment i'm trying to use a stylesheet which i get through a
I'm trying to use DateTimeOffset to convey a specific moment in time across any
At the moment I'm trying to use Python to detect when the left mouse
I am at the moment trying to learn how to use basic grid view
I'm trying to use hibernate with spring 3 mvc but at the moment I
I'm trying to use local_setting in Django 1.2 , but it's not working for
having a blonde moment here, trying to use CSS to tell a divider to
I am trying to use GWTs RequestFactory to (at the moment) do something very
Im trying to use the Greendroid library inside eclipse. In the moment i import

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.