Denis Denis - 3 years ago 131
C# Question

Cocos2d structure and navigation

Cocos 2d xna c#.

I'm using windows tamplate.
I have next classes Programm, Game1, AppDelegate, IntroLayer, MainLayer.
Programm, Game1, AppDelegate - I understand that it's begin and settings, like resolution, touch and ect.
From AppDelegate we run and Draw IntroLayer. 'Layer', it's like (.xaml +.xaml.cs) file in wpf?
In IntroLayer i want to lisen mouse and keyboard, but

public override void Update(float dt)
don't listen.
I only listen in
Update method in Game1 class
.

I search cocos2d tutorials, but found little. This's tutorial good link.

Answer Source

I found the answer for my questions. I need to add this code in my layer to get Update method.

    public override bool Init()
    {
        ScheduleUpdate();
        return base.Init();
    }

    public override void Update(float dt)
    {
         base.Update(dt);
    }

I found it this: link to stackoverflow

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download