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 8381451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:42:16+00:00 2026-06-09T16:42:16+00:00

My game has a collision detection where when my missile hits the enemy the

  • 0

My game has a collision detection where when my missile hits the enemy the enemy disappears. I want to add a scoring system that adds 1 point every time my missile hits the enemy. I’ll post my game code below (I used the HelloWorldLayer.m)**

Here is the code:

Link – http://pastebin.com/iGP83SCv

In the collision section i just want it to add 1 point every time the projectile hits the enemy “sprout” and display the score in label. Example: Score:0000

PS, please explain it as easy as possible.

  • 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-09T16:42:17+00:00Added an answer on June 9, 2026 at 4:42 pm

    @synthesize a “score” property of type int, and a “scoreLabel” property of type CCLabelTTF.

    initialize your score property to “0” in -(void)init

    On line 126, increment your “score” property by 1, and set that value into your CCLabelTTF.

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

Sidebar

Related Questions

I have a main character in my Box2d game that has a b2PolygonShape collision.
im creating a game that has multiple levels and the levels contain multiple textures
I am making a game that has its own level editor. The editor simply
I'm making a multiplayer flash game that has a lot of graphics/code. I'm having
I'm trying to make an editor for a game which has an event system,
I am working on a game in OBJ C that has a ball view
I am working on a game that has AI logic, movement, etc and drawing.
I'm building a game in Javascript using canvas which requires collision detection, in this
I am working on a game that has destructible terrain (like in the game
In my app I have a character that has feet and I want to

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.