Вопрос

i am trying to do something that should be quite simple, call a method from a another class, I have allready done it once in my project but this time it doesn't work.

How I am calling the method:

Characters.Character_One.MoveLeft();

this is the contents of the method I am trying to call:

public static void MoveLeft(Character_One c)
{
    c.s.Top -= movespeed;
}
Это было полезно?

Решение

You're not passing it the parameter it requires - an instance of Character_One.

var charOne = new Character_One();

Characters.Character_One.MoveLeft(charOne);
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top