Costin
Costin
CC#
Created by Costin on 4/19/2023 in #help
❔ Make package C private in project A, which inherits project B which uses package C
Update: I replaced PrivateAssets="All" with PrivateAssets="compile". Is it a good solution?
6 replies
CC#
Created by Costin on 4/19/2023 in #help
❔ Make package C private in project A, which inherits project B which uses package C
I have tried doing the following in project B's config (PrivateAssets = "All"):
<ItemGroup>
<PackageReference Include="SFML.Net" Version="2.5.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SFML.Net" Version="2.5.0" PrivateAssets="All" />
</ItemGroup>
however, it throws System.IO.FileNotFoundException: 'Could not load file or assembly exception, meaning that the package is not being placed with project A's build. I am (obviously) running from project A.
6 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
or smh
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
I will re-open a new one with a better issue
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
idk
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
what
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
\
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
this is still active
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
aaa
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
Not yet, I want opinions on above
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
and besides, it's not hard to make 2 methods and separate the controls there
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
idk, I would like opinions from more people
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
wdym
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
why hard to maintain fast
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
?
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
why would you prefer 2 different scripts for controlling?
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
wdym
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
also I improved the code a bit
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
@cathei this can be the Cat code
57 replies
CC#
Created by Costin on 1/7/2023 in #help
✅ 3 objects inheritance thing + force call base.DoThing();
no, let's say this is Cat code:
public class Cat : BaseControllableEntity
{
float pawAttackTimer;

public void doPawAttack()
{
//animation, damage, etc
//there will also be a delay
}
public void damage()
{
//someone is trying to kill the cat
death();
}
public void death()
{

}

public override void OnStart()
{
//initialize stuff if needed
}

public override void OnUpdate()
{
//some optional cat code such as blinking idk
if (isPlayer) {
//input check
//perform actions such as paw attack or move

if(Input.blabla)
{
//move code (better to move to a function controlled with enums/indexes)
}
if(DoAPawAttack && pawAttackTimer <= 0)
{
doPawAttack();
}
} else
{
//ai thinking
//perform actions such as paw attack or move

if(DoAPawAttack && pawAttackTimer <= 0)
{
doPawAttack();
}
if(wantToMove)
{
//move code (better to move to a function controlled with enums/indexes)
}
}
}
}
public class Cat : BaseControllableEntity
{
float pawAttackTimer;

public void doPawAttack()
{
//animation, damage, etc
//there will also be a delay
}
public void damage()
{
//someone is trying to kill the cat
death();
}
public void death()
{

}

public override void OnStart()
{
//initialize stuff if needed
}

public override void OnUpdate()
{
//some optional cat code such as blinking idk
if (isPlayer) {
//input check
//perform actions such as paw attack or move

if(Input.blabla)
{
//move code (better to move to a function controlled with enums/indexes)
}
if(DoAPawAttack && pawAttackTimer <= 0)
{
doPawAttack();
}
} else
{
//ai thinking
//perform actions such as paw attack or move

if(DoAPawAttack && pawAttackTimer <= 0)
{
doPawAttack();
}
if(wantToMove)
{
//move code (better to move to a function controlled with enums/indexes)
}
}
}
}
57 replies