adamistheman
adamistheman
CC#
Created by adamistheman on 2/9/2023 in #help
❔ Understanding Delegates
So to reiterate, writing this down would look like this instead? :
// I shortened this down to just 1 int.

private int Health;
private delegate int HealthBar(int Hp);

private void PassExample(StatBars myStats)
{
myStats(Health);
}

HealthBar hpBar = HP => Hp.Health;
// I shortened this down to just 1 int.

private int Health;
private delegate int HealthBar(int Hp);

private void PassExample(StatBars myStats)
{
myStats(Health);
}

HealthBar hpBar = HP => Hp.Health;
Would this be right? And I can also expand upon it with what I have in my previous example?
15 replies
CC#
Created by adamistheman on 1/28/2023 in #help
❔ Unity: NewInputSystem: MultiTap
I understand that, but I do not know what is causing the error, or how to fix it
5 replies
CC#
Created by adamistheman on 1/28/2023 in #help
❔ Unity: NewInputSystem: MultiTap
5 replies
CC#
Created by adamistheman on 1/26/2023 in #help
Something Ain't right... -_-
I was following exactly what he put down, but it didn't make sense when I tried converting it for self interpretation. I didn't know what "student" was, so I was trying to improvise. I do know quite a bit of the basics, but for some reason this didn't catch my eye. Thanks for that.
16 replies
CC#
Created by adamistheman on 1/26/2023 in #help
Something Ain't right... -_-
and then right after he says, (Don't worry about the "new Student" stuff. I get to that topic in book 2)
16 replies
CC#
Created by adamistheman on 1/26/2023 in #help
Something Ain't right... -_-
// Instantiate for Student. List<Student> studentList = new List<Student>(); Student student1 = new Student("Vigil"); studentList.Add(student1);| Student[] students = {new Student("Mox"), new Student ("Fox") }; Console.WriteLine("Num students in studentList = " + studentList.Count);
16 replies
CC#
Created by adamistheman on 1/26/2023 in #help
Something Ain't right... -_-
And I'll type verbatim
16 replies
CC#
Created by adamistheman on 1/26/2023 in #help
Something Ain't right... -_-
They were explaining lists
16 replies
CC#
Created by adamistheman on 1/26/2023 in #help
Something Ain't right... -_-
It's a C# 5.0 for Dummies
16 replies
CC#
Created by adamistheman on 1/26/2023 in #help
Something Ain't right... -_-
Wow. This "dummies" book really knows how to screw with your head. Thanks
16 replies
CC#
Created by adamistheman on 1/26/2023 in #help
Something Ain't right... -_-
ok
16 replies