public class Test : MonoBehaviour {
// Use this for initialization
void Start () {
a1 ins = new a1();
a1.G();
}
}
class a1{
public void F(){
Debug.Log("a1.F");
}
}
class a2 : a1{
public void G(){
Debug.Log("a2.G");
}
}
So I wrote like above in unityscript and it worked for PC platform (Dynamic compile possible),
but I need to convert that for android, ios, so should change to Strict compile (#pragma strict),
result error says -
a1' does not contain a definition for G’
Then how to revise this?
Below is part of my script of unityscript version. (Has compile error for mobile game)
class CharactersCard{ // for all character's general
var skillType : cardSkillTypes;
}
class GrndMgSkillCard extends CharactersCard{
var byDefaultVal : boolean = true; // use default values?
var element : elements;
var fireCrds : fireCards;
var iceCrds : iceCards;
var windCrds : windCards;
var earthCrds : earthCards;
var otherCrds : otherCards;
var buffCrds : buffCards;
var guardCrds : guardCards;
var myCard : GmCard ;
}
var auxPlyrCrds : CharactersCard[];
for(var z : int = 0 ; z < auxMxCrds ; z++){
if(auxPlyrCrds[z].myCard.guardSkill){
.....
...
error : myCard is not a member of ‘CharactersCard’